Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Oct 20, 2010
1 parent 3efcc08 commit a304773
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions t/04-canonicalize-source.t
@@ -0,0 +1,31 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

use Eval::Closure;

{
my $code = eval_closure(
source =>
'sub {'
. '"foo"'
. '}',
);
ok($code, "got code");
is($code->(), "foo", "got the right code");
}

{
my $code = eval_closure(
source => [
'sub {',
'"foo"',
'}',
],
);
ok($code, "got code");
is($code->(), "foo", "got the right code");
}

done_testing;

0 comments on commit a304773

Please sign in to comment.