1*b39c5158Smillert#!./perl 2*b39c5158Smillert 3*b39c5158SmillertBEGIN { print "1..1\n"; } 4*b39c5158Smillert 5*b39c5158SmillertBEGIN { $SIG{__DIE__} = sub { 6*b39c5158Smillert $_[0] =~ /\Asyntax error at [^ ]+ line ([0-9]+), at EOF/ or exit 1; 7*b39c5158Smillert my $error_line_num = $1; 8*b39c5158Smillert print $error_line_num == $last_line_num ? "ok 1\n" : "not ok 1\n"; 9*b39c5158Smillert exit 0; 10*b39c5158Smillert}; } 11*b39c5158Smillert 12*b39c5158Smillert# the next line causes a syntax error at end of file, to be caught above 13*b39c5158SmillertBEGIN { $last_line_num = __LINE__; } print 1+ 14