Skip to content
Browse files

added more test

  • Loading branch information...
1 parent f7105a5 commit 5d9bf98c523a510bfcba745534f1d57cdae02eb4 @dams committed
Showing with 23 additions and 0 deletions.
  1. +23 −0 t/01_Params-Check.t
View
23 t/01_Params-Check.t
@@ -369,3 +369,26 @@ use constant TRUE => sub { 1 };
}
}
+# more store tests
+{ my $foo;
+ my @bar;
+ my %baz;
+ my $tmpl = {
+ foo => { store => \$foo },
+ bar => { store => \@bar },
+ baz => { store => \%baz },
+ };
+
+ my $rv = check( $tmpl, { foo => 42,
+ bar => [ 'a', 'pony' ],
+ baz => { another => 'animal' },
+ } );
+ ok( $rv );
+ is( $foo, 42 );
+ is( $rv->{foo}, 42 );
+ is_deeply( \@bar, [ 'a', 'pony' ] );
+ is_deeply( $rv->{bar}, [ 'a', 'pony' ] );
+ is_deeply( \%baz, { another => 'animal' });
+ is_deeply( $rv->{baz}, { another => 'animal' } );
+}
+

0 comments on commit 5d9bf98

Please sign in to comment.
Something went wrong with that request. Please try again.