1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

; 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.
This commit is contained in:
Basil L. Contovounesios 2020-04-30 10:46:54 +01:00
parent 3c810669f7
commit 72570e0fc3

View File

@ -85,7 +85,7 @@
(should (equal (dom-attr dom attr) value))))
(ert-deftest dom-tests-remove-attribute ()
(let ((dom `(body ((foo . "bar") (zot . "foobar")))))
(let ((dom (copy-tree '(body ((foo . "bar") (zot . "foobar"))))))
(should (equal (dom-attr dom 'foo) "bar"))
(dom-remove-attribute dom 'foo)
(should (equal (dom-attr dom 'foo) nil))