summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorShawn M Moore <sartak@bestpractical.com>2011-01-26 22:19:50 -0500
committerShawn M Moore <sartak@bestpractical.com>2011-01-26 22:21:05 -0500
commit75e6988b5ef9fd1dd384d0bf3a74e50178683d17 (patch)
tree2e51c0bcd943c2e0213712653551f3df917722b0 /t
parent5617e9667fce453ffa66029ebc10c972a3066725 (diff)
downloadeval-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.t13
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;