summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/progmodes')
-rw-r--r--test/lisp/progmodes/flymake-resources/test.pl2
-rw-r--r--test/lisp/progmodes/flymake-resources/test.rb5
-rw-r--r--test/lisp/progmodes/flymake-tests.el27
3 files changed, 20 insertions, 14 deletions
diff --git a/test/lisp/progmodes/flymake-resources/test.pl b/test/lisp/progmodes/flymake-resources/test.pl
index d5abcb47e7f..6f4f1ccef50 100644
--- a/test/lisp/progmodes/flymake-resources/test.pl
+++ b/test/lisp/progmodes/flymake-resources/test.pl
@@ -1,2 +1,4 @@
@arr = [1,2,3,4];
+unknown;
my $b = @arr[1];
+[
diff --git a/test/lisp/progmodes/flymake-resources/test.rb b/test/lisp/progmodes/flymake-resources/test.rb
new file mode 100644
index 00000000000..1419eaf3ad2
--- /dev/null
+++ b/test/lisp/progmodes/flymake-resources/test.rb
@@ -0,0 +1,5 @@
+def bla
+ return 2
+ print "not reached"
+ something
+ oops
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."