aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorVibhav Pant2017-02-13 17:07:36 +0530
committerVibhav Pant2017-02-13 17:07:36 +0530
commitcb410433e069b5bb450193353c3fea8593a643a9 (patch)
treed2f4269781b4841e5a0c27ec57a5a4fbcec386c0 /test/lisp
parente742450427007cdde242c11380dfe32a950fab61 (diff)
parent4b18ef7ba3dd8aae4f3c3bf931365ef7da883baf (diff)
downloademacs-feature/byte-switch.tar.gz
emacs-feature/byte-switch.zip
Merge branch 'master' into feature/byte-switchfeature/byte-switch
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/progmodes/js-tests.el17
-rw-r--r--test/lisp/textmodes/css-mode-tests.el3
2 files changed, 19 insertions, 1 deletions
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el
index 7cb737c30e2..d61f084e0df 100644
--- a/test/lisp/progmodes/js-tests.el
+++ b/test/lisp/progmodes/js-tests.el
@@ -23,6 +23,7 @@
23 23
24(require 'ert) 24(require 'ert)
25(require 'js) 25(require 'js)
26(require 'syntax)
26 27
27(ert-deftest js-mode-fill-bug-19399 () 28(ert-deftest js-mode-fill-bug-19399 ()
28 (with-temp-buffer 29 (with-temp-buffer
@@ -99,6 +100,22 @@ if (!/[ (:,='\"]/.test(value)) {
99 (forward-line) 100 (forward-line)
100 (should (looking-at " \\* test")))) 101 (should (looking-at " \\* test"))))
101 102
103(ert-deftest js-mode-regexp-syntax-bug-25529 ()
104 (dolist (regexp-contents '("[^[]"
105 "[/]"
106 ;; A comment with the regexp on the next
107 ;; line.
108 "*comment*/\n/regexp"))
109 (with-temp-buffer
110 (js-mode)
111 (insert "let x = /" regexp-contents "/;\n")
112 (save-excursion (insert "something();\n"))
113 ;; The failure mode was that the regexp literal was not
114 ;; recognized, causing the next line to be given string syntax;
115 ;; but check for comment syntax as well to prevent an
116 ;; implementation not recognizing the comment example.
117 (should-not (syntax-ppss-context (syntax-ppss))))))
118
102(provide 'js-tests) 119(provide 'js-tests)
103 120
104;;; js-tests.el ends here 121;;; js-tests.el ends here
diff --git a/test/lisp/textmodes/css-mode-tests.el b/test/lisp/textmodes/css-mode-tests.el
index 5372c37a179..d601f43002a 100644
--- a/test/lisp/textmodes/css-mode-tests.el
+++ b/test/lisp/textmodes/css-mode-tests.el
@@ -226,7 +226,8 @@
226 ("a:v" "isited" ":visited") 226 ("a:v" "isited" ":visited")
227 ("border-" "color: red" "border-color") 227 ("border-" "color: red" "border-color")
228 ("border-color: red" ";" "border-color") 228 ("border-color: red" ";" "border-color")
229 ("border-color: red; color: green" ";" "color"))) 229 ("border-color: red; color: green" ";" "color")
230 (" border-collapse " ": collapse;" "border-collapse")))
230 (with-temp-buffer 231 (with-temp-buffer
231 (css-mode) 232 (css-mode)
232 (insert (nth 0 item)) 233 (insert (nth 0 item))