aboutsummaryrefslogtreecommitdiff
path: root/t/errors.t
diff options
context:
space:
mode:
Diffstat (limited to 't/errors.t')
-rw-r--r--t/errors.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/errors.t b/t/errors.t
index 44cf190..499310e 100644
--- a/t/errors.t
+++ b/t/errors.t
@@ -4,7 +4,7 @@ use strict;
use warnings;
use utf8;
-use Test::More tests => 5;
+use Test::More tests => 7;
use List::Breakdown 'breakdown';
@@ -23,8 +23,11 @@ is( eval { breakdown { a => undef }, @t } || undef,
# A non-reference value in spec hashref is fatal
is( eval { breakdown { a => 'a' }, @t } || undef, undef, 'error_notref_def' );
-# The wrong kind of reference as a value in spec hashref is fatal
-is( eval { breakdown { a => [] }, @t } || undef, undef, 'error_badref_array' );
+# Any number of items in the numeric range shortcut besides 2 is fatal
+is( eval { breakdown { a => [] }, @t } || undef, undef, 'error_badref_array' );
+is( eval { breakdown { a => [1] }, @t } || undef, undef, 'error_badref_array' );
+is( eval { breakdown { a => [ 1, 2, 3 ] }, @t } || undef,
+ undef, 'error_badref_array' );
# A double reference as a value in a spec hashref is fatal
is( eval { breakdown { a => \{} }, @t } || undef, undef,