[perl5db] add a test for o PrintRet=0.
authorShlomi Fish <shlomif@shlomifish.org>
Thu, 27 Sep 2012 17:50:05 +0000 (19:50 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:25 +0000 (09:18 -0500)
lib/perl5db.t

index 0ef2eb1..68d59c7 100644 (file)
@@ -28,7 +28,7 @@ BEGIN {
     }
 }
 
-plan(98);
+plan(99);
 
 my $rc_filename = '.perldb';
 
@@ -2326,7 +2326,7 @@ sub _calc_trace_wrapper
     );
 }
 
-# Test the o PrintRet=1 command
+# Test the o PrintRet=1 option
 {
     my $wrapper = DebugWrap->new(
         {
@@ -2351,6 +2351,31 @@ sub _calc_trace_wrapper
     );
 }
 
+# Test the o PrintRet=0 option
+{
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                'o PrintRet=0',
+                'b 29',
+                'c',
+                q/$x = 's';/,
+                'b 10',
+                'c',
+                'r',
+                'q',
+            ],
+            prog => '../lib/perl5db/t/test-PrintRet-option-1',
+        }
+    );
+
+    $wrapper->contents_unlike(
+        qr/scalar context/,
+        "Test o PrintRet=0",
+    );
+}
+
 END {
     1 while unlink ($rc_filename, $out_fn);
 }