diff options
author | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
---|---|---|
committer | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
commit | 4dd1f56f29fc598a8339a345c2f8945250600602 (patch) | |
tree | af341efedffe027e533b1bcc0dbf270532e48285 /test/lisp/dom-tests.el | |
parent | 4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff) | |
parent | 810fa21d26453f898de9747ece7205dfe6de9d08 (diff) | |
download | emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.bz2 emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/dom-tests.el')
-rw-r--r-- | test/lisp/dom-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/dom-tests.el b/test/lisp/dom-tests.el index 0a0d783b824..b55982c1a15 100644 --- a/test/lisp/dom-tests.el +++ b/test/lisp/dom-tests.el @@ -209,5 +209,13 @@ child results in an error." (dom-pp node t) (should (equal (buffer-string) "(\"foo\" nil)"))))) +(ert-deftest dom-test-search () + (let ((dom '(a nil (b nil (c nil))))) + (should (equal (dom-search dom (lambda (d) (eq (dom-tag d) 'a))) + (list dom))) + (should (equal (dom-search dom (lambda (d) (memq (dom-tag d) '(b c)))) + (list (car (dom-children dom)) + (car (dom-children (car (dom-children dom))))))))) + (provide 'dom-tests) ;;; dom-tests.el ends here |