aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/xml-tests.el21
1 files changed, 1 insertions, 20 deletions
diff --git a/test/src/xml-tests.el b/test/src/xml-tests.el
index d758c8868cf..800f400b3ca 100644
--- a/test/src/xml-tests.el
+++ b/test/src/xml-tests.el
@@ -42,20 +42,6 @@
42 (comment nil "comment-b") (comment nil "comment-c")))) 42 (comment nil "comment-b") (comment nil "comment-c"))))
43 "Alist of XML strings and their expected parse trees for preserved comments.") 43 "Alist of XML strings and their expected parse trees for preserved comments.")
44 44
45(defvar libxml-tests--data-comments-discarded
46 `(;; simple case
47 ("<?xml version=\"1.0\"?><foo baz=\"true\">bar</foo>"
48 . (foo ((baz . "true")) "bar"))
49 ;; toplevel comments -- first document child must not get lost
50 (,(concat "<?xml version=\"1.0\"?><foo>bar</foo><!--comment-1-->"
51 "<!--comment-2-->")
52 . (foo nil "bar"))
53 (,(concat "<?xml version=\"1.0\"?><!--comment-a--><foo a=\"b\">"
54 "<bar>blub</bar></foo><!--comment-b--><!--comment-c-->")
55 . (foo ((a . "b")) (bar nil "blub"))))
56 "Alist of XML strings and their expected parse trees for discarded comments.")
57
58
59(ert-deftest libxml-tests () 45(ert-deftest libxml-tests ()
60 "Test libxml." 46 "Test libxml."
61 (when (fboundp 'libxml-parse-xml-region) 47 (when (fboundp 'libxml-parse-xml-region)
@@ -64,11 +50,6 @@
64 (erase-buffer) 50 (erase-buffer)
65 (insert (car test)) 51 (insert (car test))
66 (should (equal (cdr test) 52 (should (equal (cdr test)
67 (libxml-parse-xml-region (point-min) (point-max))))) 53 (libxml-parse-xml-region (point-min) (point-max))))))))
68 (dolist (test libxml-tests--data-comments-discarded)
69 (erase-buffer)
70 (insert (car test))
71 (should (equal (cdr test)
72 (libxml-parse-xml-region (point-min) (point-max) nil t)))))))
73 54
74;;; libxml-tests.el ends here 55;;; libxml-tests.el ends here