Changeset 6095
- Timestamp:
- 08/07/05 00:54:06 (3 years ago)
- Location:
- t/rules/from_perl6_rules
- Files:
-
- 5 modified
- 1 moved
-
. (moved) (moved from t_disabled/rules/from_perl6_rules/temp_moved_here_because_pge_doesnt_work_atm)
-
array_cap.t (modified) (2 diffs)
-
capture.t (modified) (1 diff)
-
der_grammar.t (modified) (2 diffs)
-
named_cap.t (modified) (1 diff)
-
word.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
t/rules/from_perl6_rules/array_cap.t
r5627 r6095 40 40 # ok("abcxyd" ~~ m/a @GA:=(.(.))+ d/, 'Global array capture'); 41 41 is("@GA[]", "c y", 'Global array captured'); 42 ok(%$/.keys == 0, 'No vestigal captures' );42 ok(%$/.keys == 0, 'No vestigal captures', :todo<bug> ); 43 43 44 44 my @foo; … … 56 56 is $ret, "bc", 'Implicit hypothetical variable captured -- retval is correct'; 57 57 } 58 ok(! @{$/<foo>}, 'Explicit hypothetical variable not captured' );58 ok(! @{$/<foo>}, 'Explicit hypothetical variable not captured', :todo<bug>); 59 59 60 60 fail "Test hangs", :todo<bug>; -
t/rules/from_perl6_rules/capture.t
r5627 r6095 22 22 rule dotdot { (.)(.) }; 23 23 24 fail "Test hangs", :todo<bug>; 25 # ok("zzzabcdefzzz" ~~ m/(a.)<?dotdot>(..)/, 'Match'); 24 ok("zzzabcdefzzz" ~~ m/(a.)<?dotdot>(..)/, 'Match'); 26 25 ok($/, 'Matched'); 27 26 is($/, "abcdef", 'Captured'); -
t/rules/from_perl6_rules/der_grammar.t
r5626 r6095 65 65 # Test rederivation and polymorphism... 66 66 67 ok('abc' ~~ m/^ (<Yet::Another.abc>) $/, '<Yet::Another.abc>', :todo<feature>); 67 fail("FIXME parsefail", :todo); 68 #ok(eval(q{'abc' ~~ m/^ (<Yet::Another.abc>) $/ }), '<Yet::Another.abc>', :todo<feature>); 68 69 is($/, "abc", 'abc $/', :todo<feature>); 69 70 is($0, "abc", 'abc $0', :todo<feature>); 70 71 71 ok(!( 'abc' ~~ m/ (<Yet::Another.bee>) / ), 'abc <Yet::Another.bee>'); 72 ok('aBc' ~~ m/ (<Yet::Another.bee>) /, 'aBc <Yet::Another.bee>', :todo<feature>); 72 fail("FIXME parsefail", :todo); 73 #ok(eval(q{!( 'abc' ~~ m/ (<Yet::Another.bee>) / ) }), 'abc <Yet::Another.bee>'); 74 fail("FIXME parsefail", :todo); 75 #ok(eval(q{'aBc' ~~ m/ (<Yet::Another.bee>) / }), 'aBc <Yet::Another.bee>', :todo<feature>); 73 76 is($/, "B", 'Yet::Another::bee $/', :todo<feature>); 74 77 is($0, "B", 'Yet::Another::bee $0', :todo<feature>); 75 78 76 ok(!( 'def' ~~ m/^ (<Yet::Another.def>) $/ ), 'def (<Yet::Another.def>)'); 77 ok('DeF' ~~ m/^ (<Yet::Another.def>) $/, 'DeF (<Yet::Another.def>)', :todo<feature>); 79 fail("FIXME parsefail", :todo); 80 #ok(eval(q{!( 'def' ~~ m/^ (<Yet::Another.def>) $/ ) }), 'def (<Yet::Another.def>)'); 81 fail("FIXME parsefail", :todo); 82 #ok(eval(q{'DeF' ~~ m/^ (<Yet::Another.def>) $/ }), 'DeF (<Yet::Another.def>)', :todo<feature>); 78 83 is($/, "DeF", 'DeF $/', :todo<feature>); 79 84 is($0, "DeF", 'DeF $0', :todo<feature>); 80 85 81 ok('DeF' ~~ m/^ <?Yet::Another.def> $/, '<?Yet::Another.def>', :todo<feature>); 86 fail("FIXME parsefail", :todo); 87 #ok('DeF' ~~ m/^ <?Yet::Another.def> $/, '<?Yet::Another.def>', :todo<feature>); 82 88 is($/, "DeF", '?Yet::Another.def $/', :todo<feature>); 83 89 ok($0 ne "DeF", '?Yet::Another.def $0'); … … 88 94 # Non-existent rules... 89 95 90 ok(!eval(q{ 'abc' ~~ m/ (<Another.sea>) / }), '<Another.sea>'); 96 fail("FIXME parsefail", :todo); 97 #ok(!eval(q{ 'abc' ~~ m/ (<Another.sea>) / }), '<Another.sea>'); 91 98 ok($!, 'Error', :todo<feature>); 92 99 -
t/rules/from_perl6_rules/named_cap.t
r3375 r6095 42 42 is($foo, "bc", 'Explicit package variable captured', :todo<feature> ); 43 43 44 ok("a cat_O_9_tails" ~~ m:w/<alpha> <ident>/, 'Standard captures' , :todo<feature>);45 is($/<alpha>, "a", 'Captured <?alpha>' , :todo<feature>);46 is($/<ident>, "cat_O_9_tails", 'Captured <?ident>' , :todo<feature>);44 ok("a cat_O_9_tails" ~~ m:w/<alpha> <ident>/, 'Standard captures' ); 45 is($/<alpha>, "a", 'Captured <?alpha>' ); 46 is($/<ident>, "cat_O_9_tails", 'Captured <?ident>' ); 47 47 48 ok("Jon Lee" ~~ m:w/$<first>:=(<ident>) $<family>:=[<ident>]/, 'Repeated standard captures' , :todo<feature>);49 is($/<first>, "Jon", 'Captured $first' , :todo<feature>);50 is($/<family>, "Lee", 'Captured $family' , :todo<feature>);51 is($/<ident>, "Lee", 'Captured <?ident>' , :todo<feature>);48 ok("Jon Lee" ~~ m:w/$<first>:=(<ident>) $<family>:=[<ident>]/, 'Repeated standard captures' ); 49 is($/<first>, "Jon", 'Captured $first' ); 50 is($/<family>, "Lee", 'Captured $family' ); 51 is($/<ident>, "Lee", 'Captured <?ident>' ); 52 52 53 ok("foo => 22" ~~ m:w/$0:=(foo) =\> (\d+) | $1:=(\d+) \<= $0:=(foo) /, 'Pair match' , :todo<feature>);54 is($0, 'foo', 'Key match' , :todo<feature>);55 is($1, '22', 'Value match' , :todo<feature>);53 ok("foo => 22" ~~ m:w/$0:=(foo) =\> (\d+) | $1:=(\d+) \<= $0:=(foo) /, 'Pair match' ); 54 is($0, 'foo', 'Key match' ); 55 is($1, '22', 'Value match' ); 56 56 57 57 ok("22 <= foo" ~~ m:w/$0:=(foo) =\> (\d+) | $1:=(\d+) \<= $0:=(foo) /, 'Pair match', :todo<feature> ); -
t/rules/from_perl6_rules/word.t
r3319 r6095 22 22 ok(!( "abc def" ~~ m/abc def/ ), 'Literal space nonmatch' ); 23 23 ok( "abcdef" ~~ m/abc def/, 'Nonspace match' ); 24 ok( "abc def" ~~ m:w/abc def/, 'Word space match' , :todo<feature>);25 ok( "abc\ndef" ~~ m:words/abc def/, 'Word newline match' , :todo<feature>);26 ok(!( "abcdef" ~~ m:words/abc def/ ), 'Word nonspace nonmatch' , :todo<feature>);27 ok(!( "abc def" ~~ m:words/abc <?sp> def/ ), 'Word explicit space non-match' );28 ok( "abc def" ~~ m:words/abc <?ws> def/, 'Word explicit space match', :todo< feature> );24 ok( "abc def" ~~ m:w/abc def/, 'Word space match' ); 25 ok( "abc\ndef" ~~ m:words/abc def/, 'Word newline match' ); 26 ok(!( "abcdef" ~~ m:words/abc def/ ), 'Word nonspace nonmatch' ); 27 ok(!( "abc def" ~~ m:words/abc <?sp> def/ ), 'Word explicit space non-match', :todo<bug> ); 28 ok( "abc def" ~~ m:words/abc <?ws> def/, 'Word explicit space match', :todo<bug> ); 29 29 30 30 }
