diff options
| author | Vibhav Pant | 2017-02-13 17:07:36 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2017-02-13 17:07:36 +0530 |
| commit | cb410433e069b5bb450193353c3fea8593a643a9 (patch) | |
| tree | d2f4269781b4841e5a0c27ec57a5a4fbcec386c0 /test/lisp/progmodes/js-tests.el | |
| parent | e742450427007cdde242c11380dfe32a950fab61 (diff) | |
| parent | 4b18ef7ba3dd8aae4f3c3bf931365ef7da883baf (diff) | |
| download | emacs-feature/byte-switch.tar.gz emacs-feature/byte-switch.zip | |
Merge branch 'master' into feature/byte-switchfeature/byte-switch
Diffstat (limited to 'test/lisp/progmodes/js-tests.el')
| -rw-r--r-- | test/lisp/progmodes/js-tests.el | 17 |
1 files changed, 17 insertions, 0 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 |