Permalink
Browse files

Add test for "next" bug just fixed

  • Loading branch information...
1 parent 7734363 commit 605ed02fc4c597f34aaecebdb9f2de3c3f29893e Rocky Bernstein committed Feb 17, 2012
Showing with 31 additions and 0 deletions.
  1. +11 −0 example/next2.pl
  2. +8 −0 t/20test-next2.t
  3. +6 −0 t/data/next2.cmd
  4. +6 −0 t/data/next2.right
View
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+use strict; use warnings;
+use vars qw($version $program);
+sub init();
+init();
+my $y=3;
+sub init() {
+ use File::Basename;
+ $program = basename($0); # Who am I today, anyway?
+ $version='1.0';
+}
View
@@ -0,0 +1,8 @@
+#!/usr/bin/env perl
+use warnings; use strict;
+use Test::More 'no_plan';
+use rlib '.';
+use Helper;
+my $test_prog = File::Spec->catfile(dirname(__FILE__),
+ qw(.. example next2.pl));
+Helper::run_debugger("$test_prog", 'next2.cmd');
View
@@ -0,0 +1,6 @@
+# test of another bug we once had with the "next" command.
+# Use this with example/next2.pl
+next
+p $program
+p $version
+
View
@@ -0,0 +1,6 @@
+-- (next2.pl:5)
+init();
+-- (next2.pl:6)
+my $y=3;
+$DB::D[0] = 'trepan.pl'
+$DB::D[1] = '1.0'

0 comments on commit 605ed02

Please sign in to comment.