use warnings;
use Config;
+delete $ENV{PERLDB_OPTS};
+
BEGIN {
if (! -c "/dev/null") {
print "1..0 # Skip: no /dev/null\n";
$ENV{PERL_RL} = 'Perl'; # Suppress system Term::ReadLine::Gnu
}
-plan(121);
+plan(127);
my $rc_filename = '.perldb';
);
$wrapper->output_like(
- qr/No manual entry for perlrules/,
+ qr/No (?:manual )?entry for perlrules/,
'perldoc command works fine',
);
}
);
}
+{
+ # perl 5 RT #126735 regression bug.
+ local $ENV{PERLDB_OPTS} = "NonStop=0 RemotePort=non-existent-host.tld:9001";
+ my $output = runperl( stdin => "q\n", stderr => 1, switches => [ '-d' ], prog => '../lib/perl5db/t/fact' );
+ like(
+ $output,
+ qr/^Unable to connect to remote host:/ms,
+ 'Tried to connect.',
+ );
+ unlike(
+ $output,
+ qr/syntax error/,
+ 'Can quit from the debugger after a wrong RemotePort',
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'p' command
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'p@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/1234/,
+ q/RT 120174: p command can be invoked without space after 'p'/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on array
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'x@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/0\s+1\n1\s+2\n2\s+3\n3\s+4/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before array/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on array ref
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'x\@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/\s+0\s+1\n\s+1\s+2\n\s+2\s+3\n\s+3\s+4/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before array ref/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on hash ref
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 4',
+ 'c',
+ 'x\%xyz',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/\s+'alpha'\s+=>\s+'beta'\n\s+'gamma'\s+=>\s+'delta'/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before hash ref/,
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}