aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/progmodes/js-tests.el17
-rw-r--r--test/lisp/textmodes/css-mode-tests.el3
-rw-r--r--test/src/fns-tests.el18
3 files changed, 28 insertions, 10 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))
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 160d0f106e9..a1b48a643e1 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -473,12 +473,12 @@
473 (should (lax-plist-get d2 1)) 473 (should (lax-plist-get d2 1))
474 (should-error (lax-plist-get c1 2) :type 'circular-list) 474 (should-error (lax-plist-get c1 2) :type 'circular-list)
475 (should (lax-plist-get c2 2)) 475 (should (lax-plist-get c2 2))
476 (should-not (lax-plist-get d1 2)) 476 (should-error (lax-plist-get d1 2) :type 'wrong-type-argument)
477 (should (lax-plist-get d2 2)) 477 (should (lax-plist-get d2 2))
478 (should-error (lax-plist-get c1 3) :type 'circular-list) 478 (should-error (lax-plist-get c1 3) :type 'circular-list)
479 (should-error (lax-plist-get c2 3) :type 'circular-list) 479 (should-error (lax-plist-get c2 3) :type 'circular-list)
480 (should-not (lax-plist-get d1 3)) 480 (should-error (lax-plist-get d1 3) :type 'wrong-type-argument)
481 (should-not (lax-plist-get d2 3)))) 481 (should-error (lax-plist-get d2 3) :type 'wrong-type-argument)))
482 482
483(ert-deftest test-cycle-plist-member () 483(ert-deftest test-cycle-plist-member ()
484 (let ((c1 (cyc1 1)) 484 (let ((c1 (cyc1 1))
@@ -509,12 +509,12 @@
509 (should (plist-put d2 1 1)) 509 (should (plist-put d2 1 1))
510 (should-error (plist-put c1 2 2) :type 'circular-list) 510 (should-error (plist-put c1 2 2) :type 'circular-list)
511 (should (plist-put c2 2 2)) 511 (should (plist-put c2 2 2))
512 (should (plist-put d1 2 2)) 512 (should-error (plist-put d1 2 2) :type 'wrong-type-argument)
513 (should (plist-put d2 2 2)) 513 (should (plist-put d2 2 2))
514 (should-error (plist-put c1 3 3) :type 'circular-list) 514 (should-error (plist-put c1 3 3) :type 'circular-list)
515 (should-error (plist-put c2 3 3) :type 'circular-list) 515 (should-error (plist-put c2 3 3) :type 'circular-list)
516 (should (plist-put d1 3 3)) 516 (should-error (plist-put d1 3 3) :type 'wrong-type-argument)
517 (should (plist-put d2 3 3)))) 517 (should-error (plist-put d2 3 3) :type 'wrong-type-argument)))
518 518
519(ert-deftest test-cycle-lax-plist-put () 519(ert-deftest test-cycle-lax-plist-put ()
520 (let ((c1 (cyc1 1)) 520 (let ((c1 (cyc1 1))
@@ -527,12 +527,12 @@
527 (should (lax-plist-put d2 1 1)) 527 (should (lax-plist-put d2 1 1))
528 (should-error (lax-plist-put c1 2 2) :type 'circular-list) 528 (should-error (lax-plist-put c1 2 2) :type 'circular-list)
529 (should (lax-plist-put c2 2 2)) 529 (should (lax-plist-put c2 2 2))
530 (should (lax-plist-put d1 2 2)) 530 (should-error (lax-plist-put d1 2 2) :type 'wrong-type-argument)
531 (should (lax-plist-put d2 2 2)) 531 (should (lax-plist-put d2 2 2))
532 (should-error (lax-plist-put c1 3 3) :type 'circular-list) 532 (should-error (lax-plist-put c1 3 3) :type 'circular-list)
533 (should-error (lax-plist-put c2 3 3) :type 'circular-list) 533 (should-error (lax-plist-put c2 3 3) :type 'circular-list)
534 (should (lax-plist-put d1 3 3)) 534 (should-error (lax-plist-put d1 3 3) :type 'wrong-type-argument)
535 (should (lax-plist-put d2 3 3)))) 535 (should-error (lax-plist-put d2 3 3) :type 'wrong-type-argument)))
536 536
537(ert-deftest test-cycle-equal () 537(ert-deftest test-cycle-equal ()
538 (should-error (equal (cyc1 1) (cyc1 1))) 538 (should-error (equal (cyc1 1) (cyc1 1)))