In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8ad0ee873ef9de8fbabd98634b89c1b6aca1233a?hp=85bdf03b25729816eedfea55a7f2c32c4bb80fba>
- Log ----------------------------------------------------------------- commit 8ad0ee873ef9de8fbabd98634b89c1b6aca1233a Author: Vincent Pit <[email protected]> Date: Sat Jul 25 15:56:27 2009 +0200 Add the new db tests to the MANIFEST M MANIFEST commit 7eedc5ec657fbec215a6bd7fef317d31b8aaa82f Author: Bram <[email protected]> Date: Sat Jul 25 00:32:25 2009 +0200 Add test case for [perl #61222] + a test case for proxy constant subroutines M lib/perl5db.t A lib/perl5db/t/proxy-constants A lib/perl5db/t/rt-61222 ----------------------------------------------------------------------- Summary of changes: MANIFEST | 2 + lib/perl5db.t | 53 ++++++++++++++++++++++++++++++++++++++++- lib/perl5db/t/proxy-constants | 9 +++++++ lib/perl5db/t/rt-61222 | 10 +++++++ 4 files changed, 73 insertions(+), 1 deletions(-) create mode 100644 lib/perl5db/t/proxy-constants create mode 100644 lib/perl5db/t/rt-61222 diff --git a/MANIFEST b/MANIFEST index 0874226..f26ec98 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2805,6 +2805,8 @@ lib/perl5db.pl Perl debugging routines lib/perl5db.t Tests for the Perl debugger lib/perl5db/t/eval-line-bug Tests for the Perl debugger lib/perl5db/t/lvalue-bug Tests for the Perl debugger +lib/perl5db/t/proxy-constants Tests for the Perl debugger +lib/perl5db/t/rt-61222 Tests for the Perl debugger lib/perl5db/t/symbol-table-bug Tests for the Perl debugger lib/PerlIO.pm PerlIO support module lib/PerlIO/via/QuotedPrint.pm PerlIO::via::QuotedPrint diff --git a/lib/perl5db.t b/lib/perl5db.t index bb098a1..6e57c9f 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -27,7 +27,7 @@ my $dev_tty = '/dev/tty'; } } -plan(5); +plan(7); sub rc { open RC, ">", ".perldb" or die $!; @@ -109,6 +109,57 @@ SKIP: { } } + +# Test [perl #61222] +{ + rc( + qq| + &parse_options("NonStop=0 TTY=db.out LineInfo=db.out"); + \n|, + + qq| + sub afterinit { + push(\...@db::typeahead, + 'm Pie', + 'q', + ); + }\n|, + ); + + my $output = runperl(switches => [ '-d' ], stderr => 1, progfile => '../lib/perl5db/t/rt-61222'); + my $contents; + { + local $/; + open I, "<", 'db.out' or die $!; + $contents = <I>; + close(I); + } + unlike($contents, qr/INCORRECT/, "[perl #61222]"); +} + + + +# Test for Proxy constants +{ + rc( + qq| + &parse_options("NonStop=0 TTY=db.out LineInfo=db.out"); + \n|, + + qq| + sub afterinit { + push(\...@db::typeahead, + 'm main->s1', + 'q', + ); + }\n|, + ); + + my $output = runperl(switches => [ '-d' ], stderr => 1, progfile => '../lib/perl5db/t/proxy-constants'); + is($output, "", "proxy constant subroutines"); +} + + # clean up. END { diff --git a/lib/perl5db/t/proxy-constants b/lib/perl5db/t/proxy-constants new file mode 100644 index 0000000..ea60855 --- /dev/null +++ b/lib/perl5db/t/proxy-constants @@ -0,0 +1,9 @@ +#!/usr/bin/perl +# +# This code is used by lib/perl5db.t !!! +# + +use constant FOO => "bar"; +sub s1 { + "main"; +} diff --git a/lib/perl5db/t/rt-61222 b/lib/perl5db/t/rt-61222 new file mode 100644 index 0000000..6dd6a94 --- /dev/null +++ b/lib/perl5db/t/rt-61222 @@ -0,0 +1,10 @@ +#!/usr/bin/perl +# +# This code is used by lib/perl5db.t !!! +# + +package Pie; + +sub INCORRECT (DB); + +1; -- Perl5 Master Repository
