diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-09-25 16:15:16 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-09-25 16:15:16 -0400 |
commit | 650c20f1ca4e07591a727e1cfcc74b3363d15985 (patch) | |
tree | 85d11f6437cde22f410c25e0e5f71a3131ebd07d /test/lisp/progmodes/f90-tests.el | |
parent | 8869332684c2302b5ba1ead4568bbc7ba1c0183e (diff) | |
parent | 4b85ae6a24380fb67a3315eaec9233f17a872473 (diff) | |
download | emacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.tar.gz emacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.tar.bz2 emacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.zip |
Merge 'master' into noverlay
Diffstat (limited to 'test/lisp/progmodes/f90-tests.el')
-rw-r--r-- | test/lisp/progmodes/f90-tests.el | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/test/lisp/progmodes/f90-tests.el b/test/lisp/progmodes/f90-tests.el index 0c03a190ca2..b857a25bf2a 100644 --- a/test/lisp/progmodes/f90-tests.el +++ b/test/lisp/progmodes/f90-tests.el @@ -1,8 +1,9 @@ -;;; f90-tests.el --- tests for progmodes/f90.el +;;; f90-tests.el --- tests for progmodes/f90.el -*- lexical-binding:t -*- -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2022 Free Software Foundation, Inc. ;; Author: Glenn Morris <rgm@gnu.org> +;; Maintainer: emacs-devel@gnu.org ;; This file is part of GNU Emacs. @@ -21,9 +22,6 @@ ;;; Commentary: -;; This file does not have "test" in the name, because it lives under -;; a test/ directory, so that would be superfluous. - ;;; Code: (require 'ert) @@ -98,7 +96,7 @@ end subroutine test") (insert "(/ x /)") (f90-do-auto-fill) (beginning-of-line) - (skip-chars-forward "[ \t]") + (skip-chars-forward " \t") (should (equal "&(/" (buffer-substring (point) (+ 3 (point))))))) ;; TODO bug#5593 @@ -256,21 +254,45 @@ end program prog") (should (= 5 (current-indentation))))) (ert-deftest f90-test-bug25039 () - "Test for https://debbugs.gnu.org/25039 ." + "Test for https://debbugs.gnu.org/25039 and 28786." (with-temp-buffer (f90-mode) (insert "program prog select type (a) -class is (c1) -x = 1 type is (t1) x = 2 +class is (c1) +x = 1 +class default +x=3 end select end program prog") (f90-indent-subprogram) (forward-line -3) - (should (= 2 (current-indentation))) ; type is + (should (= 2 (current-indentation))) ; class default + (forward-line -2) + (should (= 2 (current-indentation))) ; class is (forward-line -2) - (should (= 2 (current-indentation))))) ; class is + (should (= 2 (current-indentation))))) ; type is + +(ert-deftest f90-test-bug38415 () + "Test for https://debbugs.gnu.org/38415 ." + (with-temp-buffer + (f90-mode) + (setq-local f90-smart-end 'no-blink) + (insert "module function foo(x) +real :: x +end") + (f90-indent-line) + (should (equal " function foo" + (buffer-substring (point) (pos-eol)))) + (goto-char (point-max)) + (insert "\nmodule subroutine bar(x) +real :: x +end") + (f90-indent-line) + (should (equal " subroutine bar" + (buffer-substring (point) (pos-eol)))))) + ;;; f90-tests.el ends here |