Skip to content

Commit

Permalink
Add test for "next" bug just fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocky Bernstein committed Feb 17, 2012
1 parent 7734363 commit 605ed02
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions example/next2.pl
@@ -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';
}
8 changes: 8 additions & 0 deletions t/20test-next2.t
@@ -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');
6 changes: 6 additions & 0 deletions t/data/next2.cmd
@@ -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

6 changes: 6 additions & 0 deletions t/data/next2.right
@@ -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.