more better tests
[p5sagit/Function-Parameters.git] / t / eating_strict_error.t
1 #!perl
2
3 use Test::More tests => 2;
4
5 use warnings FATAL => 'all';
6 use strict;
7
8 use Dir::Self;
9
10 #use Test::Fatal;
11
12 my $file = __DIR__ . "/eating_strict_error.fail";
13 my $done = do $file;
14 my $exc = $@;
15 my $err = $!;
16
17 is $done, undef, "faulty code doesn't load";
18 is $exc, qq{Global symbol "\$records" requires explicit package name at $file line 5.\nBEGIN not safe after errors--compilation aborted at $file line 9.\n};
19 $exc or die "$file: $err";