Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use warnings;
- use strict;
- use Test::More;
- my %tests = (
- 'this is test one' => sub { $_[0] eq 'one' },
- 'this is test two' => sub { $_[0] eq 'two' },
- );
- plan tests => scalar keys %tests;
- foreach my $test ( keys %tests ) {
- my $value = "one";
- my $sub = $tests{$test};
- my $res = $sub->($value);
- ok( $res, $test );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement