Commit | Line | Data |
7dd7d008 |
1 | use strict; |
2 | use warnings; |
3 | |
023db2fb |
4 | use Test::More; |
5 | |
6 | BEGIN { |
7 | if($] eq "5.011002") { |
8 | plan skip_all => "line debugging broken on 5.11.2"; |
9 | } |
10 | } |
7dd7d008 |
11 | |
12 | use Cwd qw/cwd/; |
13 | use FindBin qw/$Bin/; |
14 | |
15 | $ENV{PERLDB_OPTS} = "NonStop"; |
16 | $ENV{DD_DEBUG} = 1; |
17 | cwd("$Bin/.."); |
18 | |
19 | # Write a .perldb file so we make sure we dont use the users one |
e4e34af3 |
20 | umask 077; |
7dd7d008 |
21 | open PERLDB, ">", "$Bin/../.perldb" or die "Cannot open $Bin/../.perldb: $!"; |
22 | close PERLDB; |
23 | |
24 | $SIG{CHLD} = 'IGNORE'; |
87195072 |
25 | $SIG{ALRM} = sub { |
7dd7d008 |
26 | fail("SIGALRM timeout triggered"); |
27 | kill(9, $$); |
28 | }; |
29 | |
30 | alarm 10; |
31 | my $output = `$^X -d t/debug.pl`; |
32 | |
3f61a25a |
33 | like($output, qr/method new \{\}, sub \{my \$self = shift;/, |
7dd7d008 |
34 | "replaced line string visible in debug lines"); |
023db2fb |
35 | |
36 | done_testing; |