Author: particle
Date: Sat Nov 5 10:16:12 2005
New Revision: 9800
Modified:
trunk/t/p6rules/anchors.t
trunk/t/p6rules/backtrack.t
trunk/t/p6rules/builtins.t
trunk/t/p6rules/capture.t
trunk/t/p6rules/cclass.t
trunk/t/p6rules/closure.t
trunk/t/p6rules/escape.t
trunk/t/p6rules/metachars.t
trunk/t/p6rules/modifiers.t
trunk/t/p6rules/subrules.t
trunk/t/p6rules/text_brk.t
trunk/t/p6rules/ws.t
Log:
updated PGE tests:
* standardize test file format
* added strictures and warnings
* silence failing TODO tests
Modified: trunk/t/p6rules/anchors.t
==============================================================================
--- trunk/t/p6rules/anchors.t (original)
+++ trunk/t/p6rules/anchors.t Sat Nov 5 10:16:12 2005
@@ -1,7 +1,10 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
# $Id$
use strict;
use warnings;
+use Test::More;
use Parrot::Test;
use Parrot::Test::PGE;
Modified: trunk/t/p6rules/backtrack.t
==============================================================================
--- trunk/t/p6rules/backtrack.t (original)
+++ trunk/t/p6rules/backtrack.t Sat Nov 5 10:16:12 2005
@@ -1,7 +1,10 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
# $Id$
use strict;
use warnings;
+use Test::More;
use Parrot::Test;
use Parrot::Test::PGE;
Modified: trunk/t/p6rules/builtins.t
==============================================================================
--- trunk/t/p6rules/builtins.t (original)
+++ trunk/t/p6rules/builtins.t Sat Nov 5 10:16:12 2005
@@ -1,7 +1,10 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
# $Id$
use strict;
use warnings;
+use Test::More;
use Parrot::Test;
use Parrot::Test::PGE;
Modified: trunk/t/p6rules/capture.t
==============================================================================
--- trunk/t/p6rules/capture.t (original)
+++ trunk/t/p6rules/capture.t Sat Nov 5 10:16:12 2005
@@ -1,6 +1,11 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
+
use strict;
use warnings;
-use Parrot::Test tests => 38;
+use Test::More;
+use Parrot::Test;
use Parrot::Test::PGE;
@@ -80,4 +85,5 @@ p6rule_like('123x', '(.)*x',
qr/mob: <123x @ 0>/, 'repeated dot capture');
-# Don't forget to change the number of test :-)
+# remember to change the number of test :-)
+BEGIN { plan tests => 38; }
Modified: trunk/t/p6rules/cclass.t
==============================================================================
--- trunk/t/p6rules/cclass.t (original)
+++ trunk/t/p6rules/cclass.t Sat Nov 5 10:16:12 2005
@@ -1,6 +1,11 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
+
use strict;
use warnings;
-use Parrot::Test tests => 53;
+use Test::More;
+use Parrot::Test;
use Parrot::Test::PGE;
@@ -69,4 +74,6 @@ p6rule_is ('------', '<-[\-+]>?', 'nega
p6rule_is ('---x--', '<-[+\-]>?', 'negated optional escaped hyphen in range');
p6rule_is ('------', '<-[+\-]>?', 'negated optional escaped hyphen in range');
-# dont forget to change the number of tests :-)
+
+# remember to change the number of tests :-)
+BEGIN { plan tests => 53; }
Modified: trunk/t/p6rules/closure.t
==============================================================================
--- trunk/t/p6rules/closure.t (original)
+++ trunk/t/p6rules/closure.t Sat Nov 5 10:16:12 2005
@@ -1,7 +1,14 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
-use Parrot::Test tests => 3;
+use strict;
+use warnings;
+use Test::More;
+use Parrot::Test;
use Parrot::Test::PGE;
+
p6rule_like("abcd", "<alpha>**{3} {{ print match }}",
qr/abcmatched/, "PIR closure");
@@ -17,4 +24,7 @@ p6rule_like("123 any",
returncc
}}}}",
qr/foo/, "multi-line PASM closure");
-
+
+
+# remember to change the number of tests :-)
+BEGIN { plan tests => 3; }
Modified: trunk/t/p6rules/escape.t
==============================================================================
--- trunk/t/p6rules/escape.t (original)
+++ trunk/t/p6rules/escape.t Sat Nov 5 10:16:12 2005
@@ -1,6 +1,11 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
+
use strict;
use warnings;
-use Parrot::Test tests => 8;
+use Test::More;
+use Parrot::Test;
use Parrot::Test::PGE;
@@ -14,4 +19,6 @@ p6rule_is ("ab42cdef", 'ab\d+cdef', 'di
p6rule_is ('abcdef', 'a\D+f', 'not digit');
p6rule_isnt("ab0cdef", 'a\D+f', 'not digit');
-# dont forget to change the number of tests :-)
+
+# remember to change the number of tests :-)
+BEGIN { plan tests => 8; }
Modified: trunk/t/p6rules/metachars.t
==============================================================================
--- trunk/t/p6rules/metachars.t (original)
+++ trunk/t/p6rules/metachars.t Sat Nov 5 10:16:12 2005
@@ -1,7 +1,10 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
# $Id$
use strict;
use warnings;
+use Test::More;
use Parrot::Test;
use Parrot::Test::PGE;
use Parrot::Config;
Modified: trunk/t/p6rules/modifiers.t
==============================================================================
--- trunk/t/p6rules/modifiers.t (original)
+++ trunk/t/p6rules/modifiers.t Sat Nov 5 10:16:12 2005
@@ -1,7 +1,10 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
# $Id$
use strict;
use warnings;
+use Test::More;
use Parrot::Test;
use Parrot::Test::PGE;
Modified: trunk/t/p6rules/subrules.t
==============================================================================
--- trunk/t/p6rules/subrules.t (original)
+++ trunk/t/p6rules/subrules.t Sat Nov 5 10:16:12 2005
@@ -1,6 +1,11 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
+
use strict;
use warnings;
-use Parrot::Test tests => 6;
+use Test::More;
+use Parrot::Test;
use Parrot::Test::PGE;
@@ -52,4 +57,6 @@ p6rule_is("ab",
p6rule_isnt(" ab", '^ <ws>: \ ab', "cut on subrules");
-# Don't forget to change the number of tests :-)
+
+# remember to change the number of tests :-)
+BEGIN { plan tests => 6; }
Modified: trunk/t/p6rules/text_brk.t
==============================================================================
--- trunk/t/p6rules/text_brk.t (original)
+++ trunk/t/p6rules/text_brk.t Sat Nov 5 10:16:12 2005
@@ -1,6 +1,14 @@
-use Parrot::Test tests => 12;
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
+
+use strict;
+use warnings;
+use Test::More;
+use Parrot::Test;
use Parrot::Test::PGE;
+
## First, test direct calls to PGE::Text::bracketed
##
pir_output_is(<<'CODE', <<'OUT', "bracketed");
@@ -62,7 +70,7 @@ OUT
## Now, test calls as subrules
##
-$PTB = "^<PGE::Text::bracketed>\$";
+my $PTB = "^<PGE::Text::bracketed>\$";
p6rule_is ("{ nested { and } okay, () and <> pairs okay }", $PTB);
p6rule_is ("{ nested { and } okay, () <>, escaped \\}'s okay }", $PTB);
p6rule_isnt("{ unmatched nested { not okay }", $PTB);
@@ -81,4 +89,6 @@ p6rule_is ('{ balanced nested [ with ]
p6rule_is ('{ a quoted "}" unbalanced right bracket} okay', $PTB);
p6rule_is ('{ quoted "}" unbalanced quotes (`}}}"""}}}}`)} okay', $PTB);
-# Don't forget to change the number of tests!
+
+# remember to change the number of tests :-)
+BEGIN { plan tests => 12; }
Modified: trunk/t/p6rules/ws.t
==============================================================================
--- trunk/t/p6rules/ws.t (original)
+++ trunk/t/p6rules/ws.t Sat Nov 5 10:16:12 2005
@@ -1,8 +1,12 @@
+#!perl
+# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+# $Id$
+
use strict;
use warnings;
-use Parrot::Test tests => 21;
-use Parrot::Test::PGE;
use Test::More;
+use Parrot::Test;
+use Parrot::Test::PGE;
# without :w
@@ -40,4 +44,6 @@ p6rule_like('dog := spot', ':w::(\w+) \:
# XXX: When available, add tests for full form :words modifier
-# Don't forget to change the number of tests :-)
+
+# remember to change the number of tests :-)
+BEGIN { plan tests => 21; }