From 75e6988b5ef9fd1dd384d0bf3a74e50178683d17 Mon Sep 17 00:00:00 2001 From: Shawn M Moore Date: Wed, 26 Jan 2011 22:19:50 -0500 Subject: Add a line option for controlling that bit as well --- t/03-description.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 't') 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; -- cgit v1.2.3-54-g00ecf