summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorToby Inkster <mail@tobyinkster.co.uk>2013-03-11 22:54:54 +0000
committerToby Inkster <mail@tobyinkster.co.uk>2013-03-11 22:54:54 +0000
commit08ea1ba13ab871b6eb8fa287bc61afec10af03ed (patch)
tree14cf55e2ea2f0bc1f5e2dd7a9e3280b1a93f8c81 /t
parenta96a0b8344301f47e174b723eec7d26d53839131 (diff)
explicit line numbering
Diffstat (limited to 't')
-rw-r--r--t/03invalid_tc.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/03invalid_tc.t b/t/03invalid_tc.t
index ade9e55..ba7c4d0 100644
--- a/t/03invalid_tc.t
+++ b/t/03invalid_tc.t
@@ -24,12 +24,13 @@ use if !eval { require Test::Warn },
use Test::Warn;
use Test::More;
-{
+eval q {
+# line 1 "embedded"
package Foo;
use Moo;
use MooX::late;
has foo => (is => 'ro', isa => 'X Y Z', required => 0);
-}
+};
# type constraint should not be checked, so no warning expected
warnings_are {
@@ -39,7 +40,7 @@ warnings_are {
# But this should warn
warnings_like {
my $foo = Foo->new(foo => 1);
-} qr{Type constraint 'X Y Z' not fully enforced \(defined at .+/03invalid_tc\.t:10, package Foo\)};
+} qr{Type constraint 'X Y Z' not fully enforced \(defined at embedded:4, package Foo\)};
# But we shouldn't get the same warning again. Too much noise!
warnings_are {