aboutsummaryrefslogtreecommitdiff
path: root/t/errors.t
diff options
context:
space:
mode:
Diffstat (limited to 't/errors.t')
-rw-r--r--t/errors.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/errors.t b/t/errors.t
new file mode 100644
index 0000000..842c344
--- /dev/null
+++ b/t/errors.t
@@ -0,0 +1,17 @@
+#!perl -T
+
+use strict;
+use warnings;
+use utf8;
+
+use Test::More tests => 4;
+
+use List::Filters 'filter';
+
+our $VERSION = 0.05;
+
+my @t = 1 .. 3;
+is( eval { filter { a => undef }, @t } || undef, undef, 'error_notref_undef' );
+is( eval { filter { a => 'a' }, @t } || undef, undef, 'error_notref_def' );
+is( eval { filter { a => [] }, @t } || undef, undef, 'error_badref_array' );
+is( eval { filter { a => \{} }, @t } || undef, undef, 'error_badref_double' );