summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Test/Deep/ArrayLength.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Test/Deep/ArrayLength.pm')
-rwxr-xr-xMaster/tlpkg/tlperl/lib/Test/Deep/ArrayLength.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/Test/Deep/ArrayLength.pm b/Master/tlpkg/tlperl/lib/Test/Deep/ArrayLength.pm
new file mode 100755
index 00000000000..a4c2c6ac8a1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Test/Deep/ArrayLength.pm
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+
+package Test::Deep::ArrayLength;
+
+use Test::Deep::Ref;
+
+sub init
+{
+ my $self = shift;
+
+ my $val = shift;
+
+ $self->{val} = $val;
+}
+
+sub descend
+{
+ my $self = shift;
+ my $got = shift;
+
+ my $exp = $self->{val};
+
+ return 0 unless $self->test_reftype($got, "ARRAY");
+
+ return Test::Deep::descend($got, Test::Deep::arraylengthonly($exp));
+}
+
+1;