diff options
author | João Távora <joaotavora@gmail.com> | 2017-11-05 12:51:30 +0000 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2017-11-05 12:55:43 +0000 |
commit | 58bb3462ee5d43efbebba29f8e218391966fb2a1 (patch) | |
tree | 6df39070946658f83d4520591da1afef9b71d50d /test/lisp/progmodes/flymake-tests.el | |
parent | 58e742b21dcd15f5a00381de3e7179210978ddc9 (diff) | |
download | emacs-58bb3462ee5d43efbebba29f8e218391966fb2a1.tar.gz emacs-58bb3462ee5d43efbebba29f8e218391966fb2a1.tar.bz2 emacs-58bb3462ee5d43efbebba29f8e218391966fb2a1.zip |
Add tests for Flymake backends for Ruby and Perl
* test/lisp/progmodes/flymake-tests.el (perl-backend)
(ruby-backend): New tests.
(warning-predicate-rx-perl, warning-predicate-function-perl):
Delete tests.
* test/lisp/progmodes/flymake-resources/test.pl: Include an
error the test file.
* test/lisp/progmodes/flymake-resources/test.rb: file.
Diffstat (limited to 'test/lisp/progmodes/flymake-tests.el')
-rw-r--r-- | test/lisp/progmodes/flymake-tests.el | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index cfa810053ca..c60f9100345 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el @@ -108,24 +108,23 @@ SEVERITY-PREDICATE is used to setup (should (eq 'flymake-warning (face-at-point))))) -(ert-deftest warning-predicate-rx-perl () - "Test perl warning via regular expression predicate." +(ert-deftest perl-backend () + "Test the perl backend" (skip-unless (executable-find "perl")) - (flymake-tests--with-flymake - ("test.pl" :severity-predicate "^Scalar value") + (flymake-tests--with-flymake ("test.pl") (flymake-goto-next-error) - (should (eq 'flymake-warning - (face-at-point))))) + (should (eq 'flymake-warning (face-at-point))) + (flymake-goto-next-error) + (should (eq 'flymake-error (face-at-point))))) -(ert-deftest warning-predicate-function-perl () - "Test perl warning via function predicate." - (skip-unless (executable-find "perl")) - (flymake-tests--with-flymake - ("test.pl" :severity-predicate - (lambda (msg) (string-match "^Scalar value" msg))) +(ert-deftest ruby-backend () + "Test the ruby backend" + (skip-unless (executable-find "ruby")) + (flymake-tests--with-flymake ("test.rb") (flymake-goto-next-error) - (should (eq 'flymake-warning - (face-at-point))))) + (should (eq 'flymake-warning (face-at-point))) + (flymake-goto-next-error) + (should (eq 'flymake-error (face-at-point))))) (ert-deftest different-diagnostic-types () "Test GCC warning via function predicate." |