diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-09-21 17:55:37 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-09-21 18:47:55 +0200 |
commit | 9fff5491c30189c8446cd03fe7d80a13b20d69d3 (patch) | |
tree | e97c31b034a270bdd36848b5754bf7f6611ca31d | |
parent | b63c3535b0cd45544b5af854f88984af5125dd0b (diff) | |
download | emacs-9fff5491c30189c8446cd03fe7d80a13b20d69d3.tar.gz emacs-9fff5491c30189c8446cd03fe7d80a13b20d69d3.tar.bz2 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.el | 21 | ||||
-rw-r--r-- | test/manual/indent/nxml.xml | 10 |
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 @@ <sub/> </t>")))) +(ert-deftest nxml-mode-test-comment-bug-17264 () + "Test for Bug#17264." + (with-temp-buffer + (nxml-mode) + (let ((data "<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<spocosy version=\"1.0\" responsetime=\"2011-03-15 13:53:12\" exec=\"0.171\"> + <!-- + <query-response requestid=\"\" service=\"objectquery\"> + <sport name=\"Soccer\" enetSportCode=\"s\" del=\"no\" n=\"1\" ut=\"2009-12-29 + 15:36:24\" id=\"1\"> + </sport> + </query-response> + --> +</spocosy> +")) + (insert data) + (goto-char (point-min)) + (search-forward "<query-response") + ;; Inside comment + (should (eq (nth 4 (syntax-ppss)) t))))) + (provide 'nxml-mode-tests) ;;; 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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<spocosy version="1.0" responsetime="2011-03-15 13:53:12" exec="0.171"> - <!-- - <query-response requestid="" service="objectquery"> - <sport name="Soccer" enetSportCode="s" del="no" n="1" ut="2009-12-29 - 15:36:24" id="1"> - </sport> - </query-response> - --> -</spocosy> |