diff options
Diffstat (limited to 'test/lisp')
| -rw-r--r-- | test/lisp/progmodes/js-tests.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el index 8e1bac10cd1..4e27913930b 100644 --- a/test/lisp/progmodes/js-tests.el +++ b/test/lisp/progmodes/js-tests.el | |||
| @@ -60,6 +60,25 @@ | |||
| 60 | * Load the inspector's shared head.js for use by tests that need to | 60 | * Load the inspector's shared head.js for use by tests that need to |
| 61 | * open the something or other")))) | 61 | * open the something or other")))) |
| 62 | 62 | ||
| 63 | (ert-deftest js-mode-fill-comment-bug () | ||
| 64 | (with-temp-buffer | ||
| 65 | (insert "/** | ||
| 66 | * javadoc stuff here | ||
| 67 | * | ||
| 68 | * what | ||
| 69 | */ | ||
| 70 | function f( ) { | ||
| 71 | // comment-auto-fill-only-comments is a variable defined in ‘newcomment.el’. comment comment") | ||
| 72 | (js-mode) | ||
| 73 | (setq-local comment-auto-fill-only-comments t) | ||
| 74 | (setq-local fill-column 75) | ||
| 75 | (auto-fill-mode 1) | ||
| 76 | (funcall auto-fill-function) | ||
| 77 | (beginning-of-line) | ||
| 78 | ;; Filling should have inserted the correct comment start. | ||
| 79 | (should (equal (buffer-substring (point) (+ 7 (point))) | ||
| 80 | " // ")))) | ||
| 81 | |||
| 63 | (ert-deftest js-mode-regexp-syntax () | 82 | (ert-deftest js-mode-regexp-syntax () |
| 64 | (with-temp-buffer | 83 | (with-temp-buffer |
| 65 | ;; Normally indentation tests are done in manual/indent, but in | 84 | ;; Normally indentation tests are done in manual/indent, but in |