Skip to content

Commit

Permalink
Fudge for niecza.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Jan 9, 2012
1 parent f0e1cc8 commit 8f11d73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions S05-transliteration/trans.t
Expand Up @@ -98,6 +98,7 @@ is("\x12c\x190".trans("\x12c" => "\x190"), "\x190\x190");

# should these be combined?
#?rakudo skip 'disambiguate ranges'
#?niecza todo
is($b.trans('A..H..Z' => 'a..h..z'), $a,
'ambiguous ranges combined');

Expand All @@ -117,6 +118,7 @@ is("hello".trans("l" => ""), "heo", "can replace with empty string");
# complement, squeeze/squash, delete

#?rakudo 2 skip 'flags'
#?niecza 2 skip 'trans flags NYI'
is('bookkeeper'.trans(:s, 'a..z' => 'a..z'), 'bokeper',
':s flag (squash)');

Expand All @@ -127,6 +129,7 @@ is('ABC123DEF456GHI'.trans('A..Z' => 'x'), 'xxx123xxx456xxx',
'no flags');

#?rakudo 4 skip 'flags'
#?niecza 4 skip 'trans flags NYI'
is('ABC123DEF456GHI'.trans(:c, 'A..Z' => 'x'),'ABCxxxDEFxxxGHI',
'... with :c');

Expand All @@ -143,6 +146,7 @@ is('Good&Plenty'.trans('len' => 'x'), 'Good&Pxxxty',
'no flags');

#?rakudo 5 skip 'flags'
#?niecza 5 skip 'trans flags NYI'
is('Good&Plenty'.trans(:s, 'len' => 'x',), 'Good&Pxty',
'squashing depends on replacement repeat, not searchlist repeat');

Expand Down Expand Up @@ -188,6 +192,7 @@ is(" <>&".trans(:c, :s, ([' ', '>', '&'] =>
};

#?rakudo skip 'closures and regexes'
#?niecza skip 'closures and regexes'
{
# closures and regexes!
is(
Expand All @@ -207,6 +212,7 @@ is(" <>&".trans(:c, :s, ([' ', '>', '&'] =>
}

#?rakudo skip 'tr///, feed operator not implemented'
#?niecza skip 'Action method quote:tr not yet implemented'
{
is(eval('"abc".trans(<== "a" => "A")'), "Abc",
"you're allowed to leave off the (...) named arg parens when you use <==");
Expand Down Expand Up @@ -255,6 +261,7 @@ is('ababab'.trans([/ab/, 'aba', 'bab', /baba/] =>
'longest token still holds, even between constant strings and regexes');

# RT #83674
#?niecza skip 'Not sure what is supposed to be going on here'
lives_ok { my @a = 1..2; @a>>.trans((1..2) => (14..15,1..2)); }, 'trans works with Cool signature';

# vim: ft=perl6

0 comments on commit 8f11d73

Please sign in to comment.