Author: particle
Date: Thu Oct 27 11:55:34 2005
New Revision: 9597

Added:
   trunk/t/p6rules/metachars.t
Modified:
   trunk/MANIFEST
   trunk/t/p6rules/modifiers.t
Log:
beginning of PGE metacharacter tests

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Thu Oct 27 11:55:34 2005
@@ -1865,6 +1865,7 @@ t/p6rules/builtins.t                    
 t/p6rules/capture.t                               []
 t/p6rules/cclass.t                                []
 t/p6rules/escape.t                                []
+t/p6rules/metachars.t                             []
 t/p6rules/modifiers.t                             []
 t/p6rules/subrules.t                              []
 t/p6rules/text_brk.t                              []

Added: trunk/t/p6rules/metachars.t
==============================================================================
--- (empty file)
+++ trunk/t/p6rules/metachars.t Thu Oct 27 11:55:34 2005
@@ -0,0 +1,47 @@
+# $Id$
+
+use strict;
+use warnings;
+use Parrot::Test;
+use Parrot::Test::PGE;
+
+
+## tests based on http://dev.perl.org/perl6/doc/design/syn/S05.html, ver. 7
+##   in the 'Changed metacharacters' and 'New metacharacters' sections
+
+
+## . -- matches any char, including newline
+p6rule_is  ('a', '.', 'dot (.)');
+p6rule_is  ("\n", '.', 'dot (.)');
+p6rule_isnt('', '.', 'dot (.)');
+
+
+## ^ and $
+p6rule_is  ('abcdef', '^abc', '^ and $ (^)');
+p6rule_is  ("abc\ndef", '^abc', '^ and $ (^)');
+p6rule_isnt("def\nabc", '^abc', '^ and $ (^)');
+p6rule_is  ('abcdef', 'def$', '^ and $ ($)');
+p6rule_is  ("abc\ndef", 'def$', '^ and $ ($)');
+p6rule_isnt("def\nabc", 'def$', '^ and $ ($)');
+
+
+## \n and \N
+
+
+## \A, \Z, \z
+
+
+## #
+
+
+## whitespace
+
+
+## ^^ and $$
+
+
+## &
+
+
+## remember to change the number of tests :-)
+BEGIN { plan tests => 9; }

Modified: trunk/t/p6rules/modifiers.t
==============================================================================
--- trunk/t/p6rules/modifiers.t (original)
+++ trunk/t/p6rules/modifiers.t Thu Oct 27 11:55:34 2005
@@ -6,7 +6,7 @@ use Parrot::Test;
 use Parrot::Test::PGE;
 
 
-## tests based on http://dev.perl.org/perl6/doc/design/syn/S05.html,
+## tests based on http://dev.perl.org/perl6/doc/design/syn/S05.html, ver. 7
 ##   in the 'Modifiers' section
 
 

Reply via email to