From: Florian Ragwitz Date: Fri, 14 Nov 2008 11:24:57 +0000 (+0100) Subject: Add TODO test for :lvalue under -d. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6fd69bbe2bea498b179902913d94c1f09d136b0c;p=p5sagit%2Fp5-mst-13.2.git Add TODO test for :lvalue under -d. Message-Id: <1226658297-24025-1-git-send-email-rafl@debian.org> p4raw-id: //depot/perl@34832 --- diff --git a/MANIFEST b/MANIFEST index a2c1796..b0593d9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -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 diff --git a/lib/perl5db.t b/lib/perl5db.t index 2cf7958..22a8271 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -26,7 +26,7 @@ my $dev_tty = '/dev/tty'; } } -plan(1); +plan(2); sub rc { open RC, ">", ".perldb" or die $!; @@ -76,6 +76,13 @@ like($contents, qr/sub factorial/, 'The ${main::_ [ '-d' ], progfile => '../lib/perl5db/t/lvalue-bug'); + like($output, qr/foo is defined/, 'lvalue subs work in the debugger'); +} + # clean up. END { diff --git a/lib/perl5db/t/lvalue-bug b/lib/perl5db/t/lvalue-bug new file mode 100644 index 0000000..14d2fbb --- /dev/null +++ b/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";