This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a test for "n EXPR()".
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 24 Dec 2011 20:03:58 +0000 (22:03 +0200)
committerRicardo Signes <rjbs@cpan.org>
Fri, 30 Dec 2011 16:54:47 +0000 (11:54 -0500)
lib/perl5db.t

index 76b8c3b..9398325 100644 (file)
@@ -28,7 +28,7 @@ BEGIN {
     }
 }
 
-plan(29);
+plan(30);
 
 my $rc_filename = '.perldb';
 
@@ -682,6 +682,29 @@ EOF
 
 }
 
+{
+    rc(<<'EOF');
+&parse_options("NonStop=0 TTY=db.out LineInfo=db.out");
+
+sub afterinit {
+    push (@DB::typeahead,
+    'n uncalled_subroutine()',
+    'c',
+    'q',
+    );
+
+}
+EOF
+
+    my $output = runperl(switches => [ '-d', ], stderr => 1, progfile => '../lib/perl5db/t/uncalled-subroutine');
+
+    like ($output, 
+        qr/<1,2,3,4,5>\n/,
+        'uncalled_subroutine was called after n EXPR()',
+        );
+
+}
+
 END {
     1 while unlink ($rc_filename, $out_fn);
 }