Subject: | [PATCH] whole bunch of failing regression tests |
The attached patch against PPI SVN r2135 adds a bunch of failing
regressions that I've accumulated over the last 4 months. The changes
include:
* Unsupported magic vars %!, $^X and $^H
* The "-1" bug from v1.115 has resurfaced as "@{$arr_ref}-1"
* Readline after comma misinterpreted as less-than
* Correct test numbering in t/08_regressions.t and t/lib/PPI.pm
Chris
Subject: | ppi-regressions.patch |
Index: t/lib/PPI.pm
===================================================================
--- t/lib/PPI.pm (revision 2135)
+++ t/lib/PPI.pm (working copy)
@@ -118,7 +118,7 @@
#####################################################################
# Process a .code/.dump file pair
-# plan: 2 + 11 * npairs
+# plan: 2 + 14 * npairs
sub run_testdir {
my $pkg = shift;
@@ -151,10 +151,10 @@
my $rv;
local *CODEFILE;
SKIP: {
- skip "No Document to test", 7 unless $Document;
+ skip "No Document to test", 10 unless $Document;
# Check standard things
- object_ok( $Document ); # 5 tests contained within
+ object_ok( $Document ); # 6 tests contained within
# Get the dump array ref for the Document object
my $Dumper = PPI::Dumper->new( $Document );
Index: t/data/08_regression/30_hash_bang.code
===================================================================
--- t/data/08_regression/30_hash_bang.code (revision 0)
+++ t/data/08_regression/30_hash_bang.code (revision 0)
@@ -0,0 +1 @@
+%! = ()
Property changes on: t/data/08_regression/17_scope.code
___________________________________________________________________
Name: svn:executable
- *
Index: t/data/08_regression/14b_minus.code
===================================================================
--- t/data/08_regression/14b_minus.code (revision 0)
+++ t/data/08_regression/14b_minus.code (revision 0)
@@ -0,0 +1 @@
+@{$arr_ref}-1
Index: t/data/08_regression/30_hash_bang.dump
===================================================================
--- t/data/08_regression/30_hash_bang.dump (revision 0)
+++ t/data/08_regression/30_hash_bang.dump (revision 0)
@@ -0,0 +1,8 @@
+PPI::Document
+ PPI::Statement
+ PPI::Token::Magic '%!'
+ PPI::Token::Whitespace ' '
+ PPI::Token::Operator '='
+ PPI::Token::Whitespace ' '
+ PPI::Structure::List ( ... )
+ PPI::Token::Whitespace '\n'
Property changes on: t/data/08_regression/17_scope.dump
___________________________________________________________________
Name: svn:executable
- *
Index: t/data/08_regression/14b_minus.dump
===================================================================
--- t/data/08_regression/14b_minus.dump (revision 0)
+++ t/data/08_regression/14b_minus.dump (revision 0)
@@ -0,0 +1,9 @@
+PPI::Document
+ PPI::Statement
+ PPI::Token::Cast '@'
+ PPI::Structure::Block { ... }
+ PPI::Statement
+ PPI::Token::Symbol '$arr_ref'
+ PPI::Token::Operator '-'
+ PPI::Token::Number '1'
+ PPI::Token::Whitespace '\n'
Index: t/data/08_regression/29_magic_carat.code
===================================================================
--- t/data/08_regression/29_magic_carat.code (revision 0)
+++ t/data/08_regression/29_magic_carat.code (revision 0)
@@ -0,0 +1 @@
+$^X = 1
Index: t/data/08_regression/32_readline.code
===================================================================
--- t/data/08_regression/32_readline.code (revision 0)
+++ t/data/08_regression/32_readline.code (revision 0)
@@ -0,0 +1 @@
+@foo = (<$fh1>, <$fh2>)
Index: t/data/08_regression/29_magic_carat.dump
===================================================================
--- t/data/08_regression/29_magic_carat.dump (revision 0)
+++ t/data/08_regression/29_magic_carat.dump (revision 0)
@@ -0,0 +1,8 @@
+PPI::Document
+ PPI::Statement
+ PPI::Token::Magic '$^X'
+ PPI::Token::Whitespace ' '
+ PPI::Token::Operator '='
+ PPI::Token::Whitespace ' '
+ PPI::Token::Number '1'
+ PPI::Token::Whitespace '\n'
Property changes on: t/data/08_regression/27_constant_hash.code
___________________________________________________________________
Name: svn:executable
- *
Index: t/data/08_regression/31_hash_carat_H.code
===================================================================
--- t/data/08_regression/31_hash_carat_H.code (revision 0)
+++ t/data/08_regression/31_hash_carat_H.code (revision 0)
@@ -0,0 +1 @@
+%^H=()
Index: t/data/08_regression/32_readline.dump
===================================================================
--- t/data/08_regression/32_readline.dump (revision 0)
+++ t/data/08_regression/32_readline.dump (revision 0)
@@ -0,0 +1,12 @@
+PPI::Document
+ PPI::Statement
+ PPI::Token::Symbol '@foo'
+ PPI::Token::Whitespace ' '
+ PPI::Token::Operator '='
+ PPI::Token::Whitespace ' '
+ PPI::Structure::List ( ... )
+ PPI::Statement::Expression
+ PPI::Token::QuoteLike::Readline '<$fh1>'
+ PPI::Token::Operator ','
+ PPI::Token::Whitespace ' '
+ PPI::Token::QuoteLike::Readline '<$fh2>'
Property changes on: t/data/08_regression/27_constant_hash.dump
___________________________________________________________________
Name: svn:executable
- *
Index: t/data/08_regression/31_hash_carat_H.dump
===================================================================
--- t/data/08_regression/31_hash_carat_H.dump (revision 0)
+++ t/data/08_regression/31_hash_carat_H.dump (revision 0)
@@ -0,0 +1,6 @@
+PPI::Document
+ PPI::Statement
+ PPI::Token::Magic '%^H'
+ PPI::Token::Operator '='
+ PPI::Structure::List ( ... )
+ PPI::Token::Whitespace '\n'
Index: t/08_regression.t
===================================================================
--- t/08_regression.t (revision 2135)
+++ t/08_regression.t (working copy)
@@ -30,12 +30,12 @@
# For each new item in t/data/08_regression add another 14 tests
-use Test::More tests => 480;
+use Test::More tests => 550;
use t::lib::PPI;
#####################################################################
# Code/Dump Testing
-# ntests = 2 + 11 * nfiles
+# ntests = 2 + 14 * nfiles
t::lib::PPI->run_testdir( catdir( 't', 'data', '08_regression' ) );