In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e2b8b3e7fdfd63eca46d686d66dd4e7a69045de5?hp=4d88a840da7e1443b8de7e08e084c6063ded18b6>

- Log -----------------------------------------------------------------
commit e2b8b3e7fdfd63eca46d686d66dd4e7a69045de5
Author: Tony Cook <[email protected]>
Date:   Mon Dec 17 19:19:32 2012 +1100

    fix the debugger t expr command regression

M       lib/perl5db.pl
M       lib/perl5db.t

commit e42327f3c8cd945abd2c88949102675c931bb2fe
Author: Tony Cook <[email protected]>
Date:   Mon Dec 17 19:09:34 2012 +1100

    rough TODO test for t expr

M       lib/perl5db.t
-----------------------------------------------------------------------

Summary of changes:
 lib/perl5db.pl |    3 +++
 lib/perl5db.t  |   25 ++++++++++++++++++++++++-
 2 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index f96f637..58e4c5c 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -3031,6 +3031,9 @@ any variables we might want to address in the C<DB> 
package.
 
             }    # PIPE:
 
+            # trace an expression
+            $cmd =~ s/^t\s/\$DB::trace |= 1;\n/;
+
             # Make sure the flag that says "the debugger's running" is
             # still on, to make sure we get control again.
             $evalarg = "\$^D = \$^D | \$DB::db_stop;\n$cmd";
diff --git a/lib/perl5db.t b/lib/perl5db.t
index 4f3fa53..b021ffe 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -28,7 +28,7 @@ BEGIN {
     }
 }
 
-plan(106);
+plan(107);
 
 my $rc_filename = '.perldb';
 
@@ -2546,6 +2546,29 @@ sub _calc_trace_wrapper
     );
 }
 
+{ # test t expr
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                # This is to avoid getting the "Debugger program terminated"
+                # junk that interferes with the normal output.
+                'o inhibit_exit=0',
+                't fact(3)',
+                'q',
+            ],
+            prog => '../lib/perl5db/t/fact',
+        }
+    );
+
+    $wrapper->contents_like(
+        qr/
+           (?:^main::fact.*return\ \$n\ \*\ fact\(\$n\ -\ 1\);.*)
+        /msx,
+        "Test t expr",
+    );
+}
+
 END {
     1 while unlink ($rc_filename, $out_fn);
 }

--
Perl5 Master Repository

Reply via email to