aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/nxml/nxml-mode-tests.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/lisp/nxml/nxml-mode-tests.el b/test/lisp/nxml/nxml-mode-tests.el
index 92744be619d..70816bb9de0 100644
--- a/test/lisp/nxml/nxml-mode-tests.el
+++ b/test/lisp/nxml/nxml-mode-tests.el
@@ -78,5 +78,26 @@
78 (should-not (equal (get-text-property squote-txt-pos 'face) 78 (should-not (equal (get-text-property squote-txt-pos 'face)
79 (get-text-property dquote-att-pos 'face)))))) 79 (get-text-property dquote-att-pos 'face))))))
80 80
81(ert-deftest nxml-mode-doctype-and-quote-syntax ()
82 (with-temp-buffer
83 (insert "<!DOCTYPE t [\n<!ENTITY f SYSTEM \"f.xml\">\n]>\n<t>'</t>")
84 (nxml-mode)
85 ;; Check that last tag is parsed as a tag.
86 (should (= 1 (car (syntax-ppss (1- (point-max))))))
87 (should (= 0 (car (syntax-ppss (point-max)))))))
88
89(ert-deftest nxml-mode-prolog-comment ()
90 (with-temp-buffer
91 (insert "<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- comment1 -->
92<t><!-- comment2 --></t><!-- comment3 -->")
93 (nxml-mode)
94 ;; Check that all comments are parsed as comments
95 (goto-char (point-min))
96 (search-forward "comment1")
97 (should (nth 4 (syntax-ppss)))
98 (search-forward "comment2")
99 (should (nth 4 (syntax-ppss)))
100 (search-forward "comment3")))
101
81(provide 'nxml-mode-tests) 102(provide 'nxml-mode-tests)
82;;; nxml-mode-tests.el ends here 103;;; nxml-mode-tests.el ends here