Skip to content

Commit

Permalink
Add TODO test for :lvalue under -d.
Browse files Browse the repository at this point in the history
Message-Id: <1226658297-24025-1-git-send-email-rafl@debian.org>

p4raw-id: //depot/perl@34832
  • Loading branch information
rafl authored and smpeters committed Nov 14, 2008
1 parent e23d9e2 commit 6fd69bb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -2558,6 +2558,7 @@ lib/parent/t/parent.t tests for parent.pm
lib/perl5db.pl Perl debugging routines
lib/perl5db.t Tests for the Perl debugger
lib/perl5db/t/eval-line-bug Tests for the Perl debugger
lib/perl5db/t/lvalue-bug Tests for the Perl debugger
lib/PerlIO.pm PerlIO support module
lib/PerlIO/via/QuotedPrint.pm PerlIO::via::QuotedPrint
lib/PerlIO/via/t/QuotedPrint.t PerlIO::via::QuotedPrint
Expand Down
9 changes: 8 additions & 1 deletion lib/perl5db.t
Expand Up @@ -26,7 +26,7 @@ my $dev_tty = '/dev/tty';
}
}

plan(1);
plan(2);

sub rc {
open RC, ">", ".perldb" or die $!;
Expand Down Expand Up @@ -76,6 +76,13 @@ like($contents, qr/sub factorial/,
'The ${main::_<filename} variable in the debugger was not destroyed'
);

TODO: {
local $ENV{PERLDB_OPTS} = "ReadLine=0";
local $::TODO = "lvalueness isn't propagated in the debugger";
my $output = runperl(switches => [ '-d' ], progfile => '../lib/perl5db/t/lvalue-bug');
like($output, qr/foo is defined/, 'lvalue subs work in the debugger');
}

# clean up.

END {
Expand Down
9 changes: 9 additions & 0 deletions lib/perl5db/t/lvalue-bug
@@ -0,0 +1,9 @@
#!/usr/bin/perl
#
# This code is used by lib/perl5db.t !!!
#

my $i;
sub foo () : lvalue { $i }
foo = 1;
print defined foo ? "foo is defined" : "foo is still undef", "\n";

0 comments on commit 6fd69bb

Please sign in to comment.