diff options
| author | Basil L. Contovounesios | 2020-04-30 10:46:54 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2020-04-30 10:46:54 +0100 |
| commit | 72570e0fc39630b03eb2e7fb1245aeaaa5a3c448 (patch) | |
| tree | 05d4516b1d6f98a25b0b121173817f457dadca57 | |
| parent | 3c810669f7b913f63049826a89e08c1691767506 (diff) | |
| download | emacs-72570e0fc39630b03eb2e7fb1245aeaaa5a3c448.tar.gz emacs-72570e0fc39630b03eb2e7fb1245aeaaa5a3c448.zip | |
; Fix last addition to dom-tests.el
* test/lisp/dom-tests.el (dom-tests-remove-attribute): Make test
idempotent by avoiding destructive modification of constant literal.
| -rw-r--r-- | test/lisp/dom-tests.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lisp/dom-tests.el b/test/lisp/dom-tests.el index eb15500d84c..f743df78fd5 100644 --- a/test/lisp/dom-tests.el +++ b/test/lisp/dom-tests.el | |||
| @@ -85,7 +85,7 @@ | |||
| 85 | (should (equal (dom-attr dom attr) value)))) | 85 | (should (equal (dom-attr dom attr) value)))) |
| 86 | 86 | ||
| 87 | (ert-deftest dom-tests-remove-attribute () | 87 | (ert-deftest dom-tests-remove-attribute () |
| 88 | (let ((dom `(body ((foo . "bar") (zot . "foobar"))))) | 88 | (let ((dom (copy-tree '(body ((foo . "bar") (zot . "foobar")))))) |
| 89 | (should (equal (dom-attr dom 'foo) "bar")) | 89 | (should (equal (dom-attr dom 'foo) "bar")) |
| 90 | (dom-remove-attribute dom 'foo) | 90 | (dom-remove-attribute dom 'foo) |
| 91 | (should (equal (dom-attr dom 'foo) nil)) | 91 | (should (equal (dom-attr dom 'foo) nil)) |