diff options
author | Shawn M Moore <sartak@bestpractical.com> | 2011-01-26 22:19:50 -0500 |
---|---|---|
committer | Shawn M Moore <sartak@bestpractical.com> | 2011-01-26 22:21:05 -0500 |
commit | 75e6988b5ef9fd1dd384d0bf3a74e50178683d17 (patch) | |
tree | 2e51c0bcd943c2e0213712653551f3df917722b0 /t | |
parent | 5617e9667fce453ffa66029ebc10c972a3066725 (diff) | |
download | eval-closure-75e6988b5ef9fd1dd384d0bf3a74e50178683d17.tar.gz eval-closure-75e6988b5ef9fd1dd384d0bf3a74e50178683d17.zip |
Add a line option for controlling that bit as well
Diffstat (limited to 't')
-rw-r--r-- | t/03-description.t | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/03-description.t b/t/03-description.t index 97f8372..15a2ce1 100644 --- a/t/03-description.t +++ b/t/03-description.t @@ -37,4 +37,17 @@ SOURCE ); } +{ + my $code = eval_closure( + source => $source, + line => 100, + description => 'accessor foo (defined at Class.pm line 282)', + ); + + like( + exception { $code->() }, + qr/^foo at accessor foo \(defined at Class\.pm line 282\) line 101\n/, + "description is set" + ); +} done_testing; |