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