Change 34832 by [EMAIL PROTECTED] on 2008/11/14 14:18:00
Subject: [PATCH] Add TODO test for :lvalue under -d.
From: Florian Ragwitz <[EMAIL PROTECTED]>
Date: Fri, 14 Nov 2008 11:24:57 +0100
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/MANIFEST#1749 edit
... //depot/perl/lib/perl5db.t#8 edit
... //depot/perl/lib/perl5db/t/lvalue-bug#1 add
Differences ...
==== //depot/perl/MANIFEST#1749 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1748~34827~ 2008-11-12 11:23:38.000000000 -0800
+++ perl/MANIFEST 2008-11-14 06:18:00.000000000 -0800
@@ -2558,6 +2558,7 @@
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
==== //depot/perl/lib/perl5db.t#8 (text) ====
Index: perl/lib/perl5db.t
--- perl/lib/perl5db.t#7~34204~ 2008-08-17 09:53:04.000000000 -0700
+++ perl/lib/perl5db.t 2008-11-14 06:18:00.000000000 -0800
@@ -26,7 +26,7 @@
}
}
-plan(1);
+plan(2);
sub rc {
open RC, ">", ".perldb" or die $!;
@@ -76,6 +76,13 @@
'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 {
==== //depot/perl/lib/perl5db/t/lvalue-bug#1 (text) ====
Index: perl/lib/perl5db/t/lvalue-bug
--- /dev/null 2008-11-04 07:18:13.288883315 -0800
+++ perl/lib/perl5db/t/lvalue-bug 2008-11-14 06:18:00.000000000 -0800
@@ -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";
End of Patch.