mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Add a new test for dom-search
This commit is contained in:
parent
aeec97fae0
commit
4d95eca97e
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue