diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2017-04-02 11:03:14 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2017-04-02 11:03:14 +0200 |
commit | 40a33a3cb711f894ac61691c03cc13e58bc38145 (patch) | |
tree | 27fcb032eb04a20bd57b412b2120d357f28ab7fa /test/lisp/progmodes/js-tests.el | |
parent | 59191cd0cbe8463f9095a71cb4048bb138d6e446 (diff) | |
parent | a184a7edc58e1e053aa317a0f162df7e225597e1 (diff) | |
download | emacs-40a33a3cb711f894ac61691c03cc13e58bc38145.tar.gz |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'test/lisp/progmodes/js-tests.el')
-rw-r--r-- | test/lisp/progmodes/js-tests.el | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el index e030675e07c..8e1bac10cd1 100644 --- a/test/lisp/progmodes/js-tests.el +++ b/test/lisp/progmodes/js-tests.el @@ -140,6 +140,43 @@ if (!/[ (:,='\"]/.test(value)) { (font-lock-ensure) (should (eq (get-text-property (point) 'face) (caddr test)))))) +(ert-deftest js-mode-propertize-bug-1 () + (with-temp-buffer + (js-mode) + (save-excursion (insert "x")) + (insert "/") + ;; The bug was a hang. + (should t))) + +(ert-deftest js-mode-propertize-bug-2 () + (with-temp-buffer + (js-mode) + (insert "function f() { + function g() + { + 1 / 2; + } + + function h() { +") + (save-excursion + (insert " + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00000000000000000000000000000000000000000000000000; + 00; + } +} +")) + (insert "/") + ;; The bug was a hang. + (should t))) + (provide 'js-tests) ;;; js-tests.el ends here |