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