Add a test for l -num.
authorShlomi Fish <shlomif@shlomifish.org>
Wed, 12 Sep 2012 10:35:43 +0000 (13:35 +0300)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:20 +0000 (09:18 -0500)
lib/perl5db.t

index aa046cb..c559666 100644 (file)
@@ -28,7 +28,7 @@ BEGIN {
     }
 }
 
-plan(78);
+plan(79);
 
 my $rc_filename = '.perldb';
 
@@ -1758,6 +1758,35 @@ package main;
     );
 }
 
+# Test the ! -number command.
+{
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                'l 3-5',
+                'l 2',
+                '! -1',
+                '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
+        .*?
+        ^2==\>\s+my\ \$x\ =\ "One";\n
+        .*?
+        ^l\ 3-5\n
+        \1
+        #msx,
+        'Test the ! -n command (along with l)',
+    );
+}
+
 END {
     1 while unlink ($rc_filename, $out_fn);
 }