aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2020-09-21 17:55:37 +0200
committerStefan Kangas2020-09-21 18:47:55 +0200
commit9fff5491c30189c8446cd03fe7d80a13b20d69d3 (patch)
treee97c31b034a270bdd36848b5754bf7f6611ca31d
parentb63c3535b0cd45544b5af854f88984af5125dd0b (diff)
downloademacs-9fff5491c30189c8446cd03fe7d80a13b20d69d3.tar.gz
emacs-9fff5491c30189c8446cd03fe7d80a13b20d69d3.zip
Convert a manual test for nxml-mode to unit test
* test/manual/indent/nxml.xml: Delete file. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-test-comment-bug-17264): New test based on deleted file.
-rw-r--r--test/lisp/nxml/nxml-mode-tests.el21
-rw-r--r--test/manual/indent/nxml.xml10
2 files changed, 21 insertions, 10 deletions
diff --git a/test/lisp/nxml/nxml-mode-tests.el b/test/lisp/nxml/nxml-mode-tests.el
index 624e5c8866d..54d3bd8d132 100644
--- a/test/lisp/nxml/nxml-mode-tests.el
+++ b/test/lisp/nxml/nxml-mode-tests.el
@@ -132,5 +132,26 @@
132 <sub/> 132 <sub/>
133</t>")))) 133</t>"))))
134 134
135(ert-deftest nxml-mode-test-comment-bug-17264 ()
136 "Test for Bug#17264."
137 (with-temp-buffer
138 (nxml-mode)
139 (let ((data "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
140<spocosy version=\"1.0\" responsetime=\"2011-03-15 13:53:12\" exec=\"0.171\">
141 <!--
142 <query-response requestid=\"\" service=\"objectquery\">
143 <sport name=\"Soccer\" enetSportCode=\"s\" del=\"no\" n=\"1\" ut=\"2009-12-29
144 15:36:24\" id=\"1\">
145 </sport>
146 </query-response>
147 -->
148</spocosy>
149"))
150 (insert data)
151 (goto-char (point-min))
152 (search-forward "<query-response")
153 ;; Inside comment
154 (should (eq (nth 4 (syntax-ppss)) t)))))
155
135(provide 'nxml-mode-tests) 156(provide 'nxml-mode-tests)
136;;; nxml-mode-tests.el ends here 157;;; nxml-mode-tests.el ends here
diff --git a/test/manual/indent/nxml.xml b/test/manual/indent/nxml.xml
deleted file mode 100644
index 61b84f270b0..00000000000
--- a/test/manual/indent/nxml.xml
+++ /dev/null
@@ -1,10 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<spocosy version="1.0" responsetime="2011-03-15 13:53:12" exec="0.171">
3 <!--
4 <query-response requestid="" service="objectquery">
5 <sport name="Soccer" enetSportCode="s" del="no" n="1" ut="2009-12-29
6 15:36:24" id="1">
7 </sport>
8 </query-response>
9 -->
10</spocosy>