File: rt-84767.t

package info (click to toggle)
libcgi-pm-perl 4.70-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,024 kB
  • sloc: perl: 6,034; makefile: 9
file content (25 lines) | stat: -rw-r--r-- 387 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!perl

use strict;
use warnings;

use Test::More;
use FindBin qw/$Bin $Script/;

plan tests => 1;

use CGI::Carp;

chdir( $Bin );

open( my $fh,"<","$Script" )
    || die "Can't open $Script for read: $!";

while ( <$fh> ) {
    eval { die("error") if /error/; };
    $@ && do {
        like( $@,qr!at \Q$0\E line 19!,'die with input line number' );
        last;
    }
}
close( $fh );