diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-08-01 23:27:34 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-08-01 23:27:34 -0500 |
commit | 7fdc514fb2d9768b3d38d078cf24d9d03403539b (patch) | |
tree | e479a548f1c1c73e2a8082b36386aff5460469c3 /t/canonicalize-source.t | |
parent | 1a2acf758e0e3bcd0694753469d237ebc356e8c1 (diff) | |
download | eval-closure-7fdc514fb2d9768b3d38d078cf24d9d03403539b.tar.gz eval-closure-7fdc514fb2d9768b3d38d078cf24d9d03403539b.zip |
remove test numbers
Diffstat (limited to 't/canonicalize-source.t')
-rw-r--r-- | t/canonicalize-source.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/canonicalize-source.t b/t/canonicalize-source.t new file mode 100644 index 0000000..79c08a3 --- /dev/null +++ b/t/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; |