[svn:parrot] r41591 - branches/pct-rx/t/compilers/pct/regex
pmichaud at svn.parrot.org
pmichaud at svn.parrot.org
Thu Oct 1 16:41:16 UTC 2009
Author: pmichaud
Date: Thu Oct 1 16:41:13 2009
New Revision: 41591
URL: https://trac.parrot.org/parrot/changeset/41591
Log:
[pct-rx]: A few more symtoken tests.
Modified:
branches/pct-rx/t/compilers/pct/regex/03-symtoken.t
Modified: branches/pct-rx/t/compilers/pct/regex/03-symtoken.t
==============================================================================
--- branches/pct-rx/t/compilers/pct/regex/03-symtoken.t Thu Oct 1 15:16:27 2009 (r41590)
+++ branches/pct-rx/t/compilers/pct/regex/03-symtoken.t Thu Oct 1 16:41:13 2009 (r41591)
@@ -60,7 +60,7 @@
.local pmc plus
plus = abc.'infix:sym<+>'()
- ok(plus, 'Matched plus following abc')
+ ok(plus, 'Matched + following abc')
match = plus.'MATCH'()
ok(match, '?$/')
$I0 = match.'from'()
@@ -69,5 +69,32 @@
is($I0, 4, "$/.to")
$S0 = match['sym']
is($S0, '+', "$<sym>")
+
+ .local pmc plus2
+ plus2 = abc.'infix:sym<++>'()
+ ok(plus2, 'Matched ++ following abc')
+ match = plus2.'MATCH'()
+ ok(match, '?$/')
+ $I0 = match.'from'()
+ is($I0, 3, "$/.from")
+ $I0 = match.'to'()
+ is($I0, 5, "$/.to")
+ $S0 = match['sym']
+ is($S0, '++', "$<sym>")
+
+ $P0 = plus2.'infix:sym<++>'()
+ nok($P0, "Didn't match another ++ after abc++")
+
+ .local pmc plusminus
+ plusminus = plus.'infix:sym<+->'()
+ ok(plusminus, 'Matched +- following abc+')
+ match = plusminus.'MATCH'()
+ ok(match, '?$/')
+ $I0 = match.'from'()
+ is($I0, 4, "$/.from")
+ $I0 = match.'to'()
+ is($I0, 6, "$/.to")
+ $S0 = match['sym']
+ is($S0, '+-', "$<sym>")
.end
More information about the parrot-commits
mailing list