aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris2017-10-19 20:05:48 -0400
committerGlenn Morris2017-10-19 20:05:48 -0400
commitddd547fada112c603dae7a204fa0b141429f1927 (patch)
tree91192ade05b1c8499a80988039acad0087d74b21 /test
parent234b1e3864b8b940f72f3727fe7087cf7e90b43d (diff)
downloademacs-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.el14
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
263select type (a) 263select type (a)
264class is (c1)
265x = 1
266type is (t1) 264type is (t1)
267x = 2 265x = 2
266class is (c1)
267x = 1
268class default
269x=3
268end select 270end select
269end program prog") 271end 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