rough TODO test for t expr
authorTony Cook <tony@develop-help.com>
Mon, 17 Dec 2012 08:09:34 +0000 (19:09 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 17 Dec 2012 08:09:34 +0000 (19:09 +1100)
lib/perl5db.t

index 4f3fa53..43345d0 100644 (file)
@@ -9,6 +9,7 @@ BEGIN {
 use strict;
 use warnings;
 use Config;
+use vars qw($TODO);
 
 BEGIN {
     if (! -c "/dev/null") {
@@ -28,7 +29,7 @@ BEGIN {
     }
 }
 
-plan(106);
+plan(107);
 
 my $rc_filename = '.perldb';
 
@@ -2546,6 +2547,30 @@ sub _calc_trace_wrapper
     );
 }
 
+{ # test t expr
+    local $TODO = "t expr is broken";
+    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);
 }