diff options
| author | Glenn Morris | 2017-10-19 20:05:48 -0400 |
|---|---|---|
| committer | Glenn Morris | 2017-10-19 20:05:48 -0400 |
| commit | ddd547fada112c603dae7a204fa0b141429f1927 (patch) | |
| tree | 91192ade05b1c8499a80988039acad0087d74b21 /test | |
| parent | 234b1e3864b8b940f72f3727fe7087cf7e90b43d (diff) | |
| download | emacs-ddd547fada112c603dae7a204fa0b141429f1927.tar.gz emacs-ddd547fada112c603dae7a204fa0b141429f1927.zip | |
Improve treatment of Fortran's "class default"
* lisp/progmodes/f90.el (f90-start-block-re, f90-no-block-limit):
Handle "class default". (Bug#28786)
* test/automated/f90.el (f90-test-bug25039): Add "class default".
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/f90-tests.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/lisp/progmodes/f90-tests.el b/test/lisp/progmodes/f90-tests.el index 0c03a190ca2..2a9100adff6 100644 --- a/test/lisp/progmodes/f90-tests.el +++ b/test/lisp/progmodes/f90-tests.el | |||
| @@ -256,21 +256,25 @@ end program prog") | |||
| 256 | (should (= 5 (current-indentation))))) | 256 | (should (= 5 (current-indentation))))) |
| 257 | 257 | ||
| 258 | (ert-deftest f90-test-bug25039 () | 258 | (ert-deftest f90-test-bug25039 () |
| 259 | "Test for https://debbugs.gnu.org/25039 ." | 259 | "Test for https://debbugs.gnu.org/25039 and 28786." |
| 260 | (with-temp-buffer | 260 | (with-temp-buffer |
| 261 | (f90-mode) | 261 | (f90-mode) |
| 262 | (insert "program prog | 262 | (insert "program prog |
| 263 | select type (a) | 263 | select type (a) |
| 264 | class is (c1) | ||
| 265 | x = 1 | ||
| 266 | type is (t1) | 264 | type is (t1) |
| 267 | x = 2 | 265 | x = 2 |
| 266 | class is (c1) | ||
| 267 | x = 1 | ||
| 268 | class default | ||
| 269 | x=3 | ||
| 268 | end select | 270 | end select |
| 269 | end program prog") | 271 | end program prog") |
| 270 | (f90-indent-subprogram) | 272 | (f90-indent-subprogram) |
| 271 | (forward-line -3) | 273 | (forward-line -3) |
| 272 | (should (= 2 (current-indentation))) ; type is | 274 | (should (= 2 (current-indentation))) ; class default |
| 275 | (forward-line -2) | ||
| 276 | (should (= 2 (current-indentation))) ; class is | ||
| 273 | (forward-line -2) | 277 | (forward-line -2) |
| 274 | (should (= 2 (current-indentation))))) ; class is | 278 | (should (= 2 (current-indentation))))) ; type is |
| 275 | 279 | ||
| 276 | ;;; f90-tests.el ends here | 280 | ;;; f90-tests.el ends here |