aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/progmodes
diff options
context:
space:
mode:
authorMichael Albinus2017-04-02 11:03:14 +0200
committerMichael Albinus2017-04-02 11:03:14 +0200
commit40a33a3cb711f894ac61691c03cc13e58bc38145 (patch)
tree27fcb032eb04a20bd57b412b2120d357f28ab7fa /test/lisp/progmodes
parent59191cd0cbe8463f9095a71cb4048bb138d6e446 (diff)
parenta184a7edc58e1e053aa317a0f162df7e225597e1 (diff)
downloademacs-40a33a3cb711f894ac61691c03cc13e58bc38145.tar.gz
emacs-40a33a3cb711f894ac61691c03cc13e58bc38145.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'test/lisp/progmodes')
-rw-r--r--test/lisp/progmodes/js-tests.el37
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)) {
140 (font-lock-ensure) 140 (font-lock-ensure)
141 (should (eq (get-text-property (point) 'face) (caddr test)))))) 141 (should (eq (get-text-property (point) 'face) (caddr test))))))
142 142
143(ert-deftest js-mode-propertize-bug-1 ()
144 (with-temp-buffer
145 (js-mode)
146 (save-excursion (insert "x"))
147 (insert "/")
148 ;; The bug was a hang.
149 (should t)))
150
151(ert-deftest js-mode-propertize-bug-2 ()
152 (with-temp-buffer
153 (js-mode)
154 (insert "function f() {
155 function g()
156 {
157 1 / 2;
158 }
159
160 function h() {
161")
162 (save-excursion
163 (insert "
164 00000000000000000000000000000000000000000000000000;
165 00000000000000000000000000000000000000000000000000;
166 00000000000000000000000000000000000000000000000000;
167 00000000000000000000000000000000000000000000000000;
168 00000000000000000000000000000000000000000000000000;
169 00000000000000000000000000000000000000000000000000;
170 00000000000000000000000000000000000000000000000000;
171 00000000000000000000000000000000000000000000000000;
172 00;
173 }
174}
175"))
176 (insert "/")
177 ;; The bug was a hang.
178 (should t)))
179
143(provide 'js-tests) 180(provide 'js-tests)
144 181
145;;; js-tests.el ends here 182;;; js-tests.el ends here