This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t let ?: folding affect truncate
[perl5.git] / t / comp / final_line_num.t
CommitLineData
85613cab
Z
1#!./perl
2
3BEGIN { print "1..1\n"; }
4
5BEGIN { $SIG{__DIE__} = sub {
6 $_[0] =~ /\Asyntax error at [^ ]+ line ([0-9]+), at EOF/ or exit 1;
7 my $error_line_num = $1;
8 print $error_line_num == $last_line_num ? "ok 1\n" : "not ok 1\n";
9 exit 0;
10}; }
11
12# the next line causes a syntax error at end of file, to be caught above
13BEGIN { $last_line_num = __LINE__; } print 1+