This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test the ! command.
[perl5.git] / 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);
 }