Test the ! command.
authorShlomi Fish <shlomif@shlomifish.org>
Wed, 12 Sep 2012 09:56:51 +0000 (12:56 +0300)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:20 +0000 (09:18 -0500)
lib/perl5db.t

index 7a65c3b..aa046cb 100644 (file)
@@ -28,7 +28,7 @@ BEGIN {
     }
 }
 
-plan(77);
+plan(78);
 
 my $rc_filename = '.perldb';
 
@@ -1732,6 +1732,32 @@ package main;
     );
 }
 
+# Test the ! command.
+{
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                'l 3-5',
+                '!',
+                'q',
+            ],
+            prog => '../lib/perl5db/t/disable-breakpoints-1',
+        }
+    );
+
+    $wrapper->contents_like(qr#
+        (^3:\s+my\ \$dummy\ =\ 0;\n
+        4\s*\n
+        5:\s+\$x\ =\ "FirstVal";)\n
+        .*?
+        ^l\ 3-5\n
+        \1
+        #msx,
+        'Test the ! command (along with l 3-5)',
+    );
+}
+
 END {
     1 while unlink ($rc_filename, $out_fn);
 }