summaryrefslogtreecommitdiffstats
path: root/t/fun/slurpy-syntax-errors.t
diff options
context:
space:
mode:
Diffstat (limited to 't/fun/slurpy-syntax-errors.t')
-rw-r--r--t/fun/slurpy-syntax-errors.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/fun/slurpy-syntax-errors.t b/t/fun/slurpy-syntax-errors.t
new file mode 100644
index 0000000..90337a5
--- /dev/null
+++ b/t/fun/slurpy-syntax-errors.t
@@ -0,0 +1,29 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/fun/lib';
+
+use Fun;
+
+{
+ eval 'fun ( $foo, @bar, $baz ) { return [] }';
+ ok $@, '... got an error';
+}
+
+{
+ eval 'fun ( $foo, %bar, $baz ) { return {} }';
+ ok $@, '... got an error';
+}
+
+{
+ eval 'fun ( $foo, @bar, %baz ) { return [] }';
+ ok $@, '... got an error';
+}
+
+{
+ eval 'fun ( $foo, %bar, @baz ) { return {} }';
+ ok $@, '... got an error';
+}
+
+done_testing;