From 8d39a9b0c86c21901824716398f74b3ab4016733 Mon Sep 17 00:00:00 2001 From: usev6 Date: Tue, 25 Oct 2016 21:32:55 +0200 Subject: [PATCH] Unfudge a lot of tests for rakudo-j All those tests are passing now after lizmat's++ recent work on subst, match et al. (Probably a side effect, but very nice, nevertheless.) --- S05-modifier/counted-match.t | 3 --- S05-modifier/counted.t | 12 ------------ S05-modifier/repetition-exhaustive.t | 1 - S05-modifier/repetition.t | 4 ---- S05-substitution/subst.t | 9 --------- S32-str/split-simple.t | 1 - S32-str/split.t | 12 ------------ 7 files changed, 42 deletions(-) diff --git a/S05-modifier/counted-match.t b/S05-modifier/counted-match.t index 0a69c2b8ba..72a4675c69 100644 --- a/S05-modifier/counted-match.t +++ b/S05-modifier/counted-match.t @@ -18,7 +18,6 @@ my $data = "f fo foo fooo foooo fooooo foooooo"; #RT #125815 throws-like '$data.match(/fo+/, :nth(0))', Exception, message => rx/nth/; - #?rakudo.jvm 2 todo 'RT #125815' throws-like '$data.match(/fo+/, :nth(-1))', Exception, message => rx/nth/; throws-like '$data.match(/fo+/, :nth(-2))', Exception, message => rx/nth/; @@ -51,7 +50,6 @@ my $data = "f fo foo fooo foooo fooooo foooooo"; # more interesting variations of :nth(...) #?niecza skip 'hangs' -#?rakudo.jvm skip 'RT #124279' { my @match = $data.match(/fo+/, :nth(2, 3)).list; is +@match, 2, 'nth(list) is ok'; @@ -73,7 +71,6 @@ my $data = "f fo foo fooo foooo fooooo foooooo"; is @match, , 'nth(infinite sequence) matched correctly'; } -#?rakudo.jvm skip 'RT #124279' #?niecza skip 'Excess arguments to CORE Cool.match' { is 'abecidofug'.match(/<[aeiou]>./, :nth(1,3,5), :x(2)).join('|'), diff --git a/S05-modifier/counted.t b/S05-modifier/counted.t index 719d7240d8..539d272db6 100644 --- a/S05-modifier/counted.t +++ b/S05-modifier/counted.t @@ -24,7 +24,6 @@ my $sub6 = "f fo foo fooo foooo fooooo bar"; #RT #125815 throws-like '$data ~~ m:nth(0)/fo+/', Exception, message => rx/nth/; -#?rakudo.jvm 2 todo 'RT #125815' throws-like '$data ~~ m:nth(-1)/fo+/', Exception, message => rx/nth/; throws-like '$data ~~ m:nth(-Inf)/fo+/', Exception, message => rx/nth/; @@ -58,7 +57,6 @@ for (1..6) -> $N { # more interesting variations of :nth(...) #?niecza skip 'm:g' -#?rakudo.jvm skip 'RT #124279' { ok($data ~~ m:nth(2,3):global/(fo+)/, 'nth(list) is ok'); is(@(), , 'nth(list) matched correctly'); @@ -162,13 +160,10 @@ ok(!( $data ~~ m:7th/fo+/ ), 'No match 7th'); my $try = $data; #RT #125815 - #?rakudo.jvm todo 'RT #125815' throws-like '$try ~~ s:0th{fo+}=q{bar}', Exception, message => rx/nth/; is($try, $data, 'No change to data for 0th'); - #?rakudo.jvm todo 'RT #125815' throws-like '$try ~~ s:th(-1){fo+}=q{bar}', Exception, message => rx/nth/; is($try, $data, 'No change to data for :th(-1)'); - #?rakudo.jvm todo 'RT #125815' throws-like '$try ~~ s:th(-Inf){fo+}=q{bar}', Exception, message => rx/nth/; is($try, $data, 'No change to data for :th(-Inf)'); @@ -216,7 +211,6 @@ is($/, 'foo', 'Matched value for 3th « '); # :nth and *-N is("ABCDE" ~~ m:nth(*)/\w/, "E", "Can match with * index"); -#?rakudo.jvm todo "got: 'False', expected: 'D'" is("ABCDE" ~~ m:nth(*-1)/\w/, "D", "Can match with *-1 index"); $data = "f fo foo fooo foooo fooooo foooooo"; @@ -235,32 +229,26 @@ $sub6 = "f bar bar bar bar bar bar"; is($try, $data, 'No change to data for 0x'); $try = $data; - #?rakudo.jvm 2 skip 'RT #124279' ok($try ~~ s:1x{fo+}=q{bar}, 'substitute 1x'); is($try, $sub1, 'substituted 1x correctly'); $try = $data; - #?rakudo.jvm 2 skip 'RT #124279' ok($try ~~ s:2x{fo+}=q{bar}, 'substitute 2x'); is($try, $sub2, 'substituted 2x correctly'); $try = $data; - #?rakudo.jvm 2 skip 'RT #124279' ok($try ~~ s:3x{fo+}=q{bar}, 'substitute 3x'); is($try, $sub3, 'substituted 3x correctly'); $try = $data; - #?rakudo.jvm 2 skip 'RT #124279' ok($try ~~ s:4x{fo+}=q{bar}, 'substitute 4x'); is($try, $sub4, 'substituted 4x correctly'); $try = $data; - #?rakudo.jvm 2 skip 'RT #124279' ok($try ~~ s:5x{fo+}=q{bar}, 'substitute 5x'); is($try, $sub5, 'substituted 5x correctly'); $try = $data; - #?rakudo.jvm 2 skip 'RT #124279' ok($try ~~ s:6x{fo+}=q{bar}, 'substitute 6x'); is($try, $sub6, 'substituted 6x correctly'); diff --git a/S05-modifier/repetition-exhaustive.t b/S05-modifier/repetition-exhaustive.t index ef8bca5741..01b5951dfb 100644 --- a/S05-modifier/repetition-exhaustive.t +++ b/S05-modifier/repetition-exhaustive.t @@ -19,7 +19,6 @@ how the C<$/> looks like with the C<:x($count)> modifier. my $str = "abbb"; my regex rx { a b+ }; -#?rakudo.jvm 4 skip 'RT #124279' ok($str ~~ m:ex:x(2)//, "Simple combination of :x(2) and :exhaustive"); #?rakudo todo 'exhaustive capture too greedy RT #125133' is(~$/[0], "ab", 'First entry of prev. genenerated $/'); diff --git a/S05-modifier/repetition.t b/S05-modifier/repetition.t index 803b154389..6774088d8f 100644 --- a/S05-modifier/repetition.t +++ b/S05-modifier/repetition.t @@ -5,11 +5,9 @@ plan 12; #L -#?rakudo.jvm skip 'RT #124279' ok('abab' ~~ m:2x/ab/, ':2x (repetition) modifier (+)'); nok('ab' ~~ m:2x/ab/, ':2x (repetition) modifier (-)'); -#?rakudo.jvm skip 'RT #124279' ok('abab' ~~ m:x(2)/ab/, ':2x (repetition) modifier (+)'); nok('ab' ~~ m:x(2)/ab/, ':2x (repetition) modifier (-)'); @@ -18,14 +16,12 @@ nok('ab' ~~ m:x(2)/ab/, ':2x (repetition) modifier (-)'); nok 'abc'.match(rx/ab/, :x(2)), ':x(2) with .match method (-)'; ok 'ababc'.match(rx/./, :x(3)), ':x(3) with .match method (bool)'; - #?rakudo.jvm skip 'RT #124279' is 'ababc'.match(rx/./, :x(3)).join('|'), 'a|b|a', ':x(3) with .match method (result)'; } { ok 'abacad'.match(rx/a./, :x(1..3)), ':x(Range)'; nok 'abcabc'.match(rx/a./, :x(3..4)), ':x(Range) > number of matches'; - #?rakudo.jvm skip 'UnwindException RT #124279' is 'abacadae'.match(rx/a./, :x(1..3)).join('|'), 'ab|ac|ad', ':x(Range) (upper bound)'; is 'abacad'.match(rx/a./, :x(2..5)).join('|'), 'ab|ac|ad', ':x(Range) (takes as much as it can)'; } diff --git a/S05-substitution/subst.t b/S05-substitution/subst.t index 26593e6490..f15a2eae39 100644 --- a/S05-substitution/subst.t +++ b/S05-substitution/subst.t @@ -54,7 +54,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; { is 'a b c d'.subst(/\w/, 'x', :g), 'x x x x', '.subst and :g'; is 'a b c d'.subst(/\w/, 'x', :global), 'x x x x', '.subst and :global'; - #?rakudo.jvm 7 skip 'RT #124279' is 'a b c d'.subst(/\w/, 'x', :x(0)), 'a b c d', '.subst and :x(0)'; is 'a b c d'.subst(/\w/, 'x', :x(1)), 'x b c d', '.subst and :x(1)'; is 'a b c d'.subst(/\w/, 'x', :x(2)), 'x x c d', '.subst and :x(2)'; @@ -63,7 +62,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; is 'a b c d'.subst(/\w/, 'x', :x(5)), 'a b c d', '.subst and :x(5)'; is 'a b c d'.subst(/\w/, 'x', :x(*)), 'x x x x', '.subst and :x(*)'; - #?rakudo.jvm 2 skip 'UnwindException RT #124279' is 'a b c d'.subst(/\w/, 'x', :x(0..1)), 'x b c d', '.subst and :x(0..1)'; is 'a b c d'.subst(/\w/, 'x', :x(1..3)), 'x x x d', '.subst and :x(0..3)'; is 'a b c d'.subst(/\w/, 'x', :x(3..5)), 'x x x x', '.subst and :x(3..5)'; @@ -73,7 +71,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; # string pattern versions is 'a a a a'.subst('a', 'x', :g), 'x x x x', '.subst (str pattern) and :g'; is 'a a a a'.subst('a', 'x', :x(0)), 'a a a a', '.subst (str pattern) and :x(0)'; - #?rakudo.jvm 6 skip 'RT #124279' is 'a a a a'.subst('a', 'x', :x(1)), 'x a a a', '.subst (str pattern) and :x(1)'; is 'a a a a'.subst('a', 'x', :x(2)), 'x x a a', '.subst (str pattern) and :x(2)'; is 'a a a a'.subst('a', 'x', :x(3)), 'x x x a', '.subst (str pattern) and :x(3)'; @@ -81,7 +78,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; is 'a a a a'.subst('a', 'x', :x(5)), 'a a a a', '.subst (str pattern) and :x(5)'; is 'a a a a'.subst('a', 'x', :x(*)), 'x x x x', '.subst (str pattern) and :x(*)'; - #?rakudo.jvm 2 skip 'UnwindException RT #124279' is 'a a a a'.subst('a', 'x', :x(0..1)), 'x a a a', '.subst (str pattern) and :x(0..1)'; is 'a a a a'.subst('a', 'x', :x(1..3)), 'x x x a', '.subst (str pattern) and :x(0..3)'; is 'a a a a'.subst('a', 'x', :x(3..5)), 'x x x x', '.subst (str pattern) and :x(3..5)'; @@ -100,7 +96,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; is 'a b c d'.subst(/\w/, 'x', :nth(5)), 'a b c d', '.subst and :nth(5)'; # string pattern versions - #?rakudo.jvm todo 'Code does not die' throws-like '"a a a a".subst("a", "x", :nth(0))', Exception, message => rx/nth/; # RT #125815 is 'a a a a'.subst('a', 'x', :nth(1)), 'x a a a', '.subst (str pattern) and :nth(1)'; is 'a a a a'.subst('a', 'x', :nth(2)), 'a x a a', '.subst (str pattern) and :nth(2)'; @@ -110,7 +105,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; } # combining :nth with :x -#?rakudo.jvm skip 'RT #124279' { is 'a b c d e f g h'.subst(/\w/, 'x', :nth(1,2,3,4), :x(3)), 'x x x d e f g h', @@ -184,7 +178,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; # :c and :nth(3, 4) #?niecza 3 todo ":nth(3, 4) NYI" - #?rakudo.jvm 3 skip 'RT #124279' is 'a b c d e f g h'.subst(/\w/, 'x', :c(0), :nth(3, 4)), 'a b x x e f g h', '.subst with :c(0) and :nth(3, 4)'; @@ -325,7 +318,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; is $_, 'aa bb cc', 's:g[...] and captures work together well'; } -#?rakudo.jvm skip 'RT #124279' { my $x = 'ABCD'; $x ~~ s:x(2)/<.alpha>/x/; @@ -360,7 +352,6 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures'; } # s/// -#?rakudo.jvm skip 'RT #124279' { my $x = 'ooooo'; $x ~~ s:x(2):nth(1,3)/o/A/; diff --git a/S32-str/split-simple.t b/S32-str/split-simple.t index 9864f6b38d..6c4a4c4a39 100644 --- a/S32-str/split-simple.t +++ b/S32-str/split-simple.t @@ -46,7 +46,6 @@ split_test @('theXbigXbang'.split(/X/, 0)), (), 'Zero limit returns empty List' } split_test 'ab1cd12ef'.split(/\d+/, 1), @(), 'Limit of 1 returns a 1 element List (with identical string)'; split_test '102030405'.split(0, 3), <1 2 30405>, 'Split on an Integer with limit parameter works'; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 1 split_test( 'soup'.split(/\<\/?.*?\>/, 3), diff --git a/S32-str/split.t b/S32-str/split.t index 462e88ff1c..8179d270e7 100644 --- a/S32-str/split.t +++ b/S32-str/split.t @@ -151,7 +151,6 @@ test( "abcde","",3,"empty string", , # rlpse ); -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 1 test( "abcd",/./,3,"any character", <<"" "" "" "" "">>, # r @@ -177,7 +176,6 @@ test( "abcd",/./,3,"any character", (0=>"a",0=>"b","cd"), # rlpse ); -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 3 test( "aaaa",$_,3,"only chars matching $_.perl()", <<"" "" "" "" "">>, # r @@ -203,7 +201,6 @@ test( "aaaa",$_,3,"only chars matching $_.perl()", (0=>"a",0=>"a","aa"), # rlpse ) for "a", /a/, rx:Perl5/a/; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 7 test( "foo bar baz",$_,2,$_, , # r @@ -229,7 +226,6 @@ test( "foo bar baz",$_,2,$_, ("foo",0=>" ","bar baz"), # rlpse ) for " ", / " " /, / \s /, / \s+ /, rx:Perl5/ /, rx:Perl5/\s/, rx:Perl5/\s+/; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 2 test( "thisisit",$_,2,$_, , # r @@ -255,7 +251,6 @@ test( "thisisit",$_,2,$_, ("thi",0=>"s","isit"), # rlpse ) for "s", /s/; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 2 test( "|foo|bar|baz|zoo",$_,3,$_, <<"" foo bar baz zoo>>, # r @@ -281,7 +276,6 @@ test( "|foo|bar|baz|zoo",$_,3,$_, (0=>"|","foo",0=>"|","bar|baz|zoo"), # rlpse ) for "|", / \| /; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 3 test( "foo|bar|baz|zoo|",$_,2,$_, <>, # r @@ -307,7 +301,6 @@ test( "foo|bar|baz|zoo|",$_,2,$_, ("foo",0=>"|","bar|baz|zoo|"), # rlpse ) for "|", / \| /, rx:Perl5/\|/; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 7 test( "comma, separated, values",$_,2,$_, , # r @@ -342,7 +335,6 @@ test("","",2,"empty string", |(() xx 20)); test("","foo",2,"empty string", |(() xx 20)); test("zzzzz","a",2,"no match",|(("zzzzz",) xx 20)); -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 1 test( "hello world",,3,, <>, # r @@ -368,7 +360,6 @@ test( "hello world",,3,, ("h",1=>"e","ll",3=>"o"," world"), # rlpse ); -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 2 test( "hello world",$_,3,$_, <>, # r @@ -411,7 +402,6 @@ test( "hello world",$_,3,$_, is @a[3][1], " ", "Fourth capture worked"; } -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 2 # RT #63066 test( "hello-world",$_,3,$_, @@ -440,7 +430,6 @@ test( "hello-world",$_,3,$_, # RT #63066 my $p = 0=>""; -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 1 test( "-a-b-c-",/<.ws>/,4,/<.ws>/, <<"" - a - b - c - "">>, # r @@ -467,7 +456,6 @@ test( "-a-b-c-",/<.ws>/,4,/<.ws>/, ); # RT #63066 -#?rakudo.jvm skip 'UnwindException RT #124279' #?DOES 1 test( "-a-b-c-",/<.wb>/,4,/<.wb>/, <- a - b - c ->, # r