Skip to content

Commit

Permalink
[trans.t] indent some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Masak committed Nov 20, 2010
1 parent 27fc171 commit a632892
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions S05-transliteration/trans.t
Original file line number Diff line number Diff line change
Expand Up @@ -208,27 +208,26 @@ is(" <>&".trans(:c, :s, ([' ', '>', '&'] =>

#?rakudo skip 'tr///, feed operator not implemented'
{
is(eval('"abc".trans(<== "a" => "A")'), "Abc",
"you're allowed to leave off the (...) named arg parens when you use <==");
is(eval('"abc".trans(<== "a" => "A")'), "Abc",
"you're allowed to leave off the (...) named arg parens when you use <==");

# Make sure the tr/// version works, too.
# Make sure the tr/// version works, too.

$_ = "ABC";
tr/ABC/abc/;
is($_, 'abc', 'tr/// on $_ with explicit character lists');
$_ = "ABC";
tr/ABC/abc/;
is($_, 'abc', 'tr/// on $_ with explicit character lists');

$_ = "abc";
tr|a..c|A..C|;
is($_, 'ABC', 'tr||| on $_ with character range');
$_ = "abc";
tr|a..c|A..C|;
is($_, 'ABC', 'tr||| on $_ with character range');

my $japh = "Whfg nabgure Crey unpxre";
$japh ~~ tr[a..z A..Z][n..z a..m N..Z A..M];
is($japh, "Just another Perl hacker", 'tr[][] on lexical var via ~~');

$_ = '$123';
tr/$123/X\x20\o40\t/;
is($_, "X \t", 'tr/// on $_ with explicit character lists');
my $japh = "Whfg nabgure Crey unpxre";
$japh ~~ tr[a..z A..Z][n..z a..m N..Z A..M];
is($japh, "Just another Perl hacker", 'tr[][] on lexical var via ~~');

$_ = '$123';
tr/$123/X\x20\o40\t/;
is($_, "X \t", 'tr/// on $_ with explicit character lists');
}

# y/// is dead
Expand Down

0 comments on commit a632892

Please sign in to comment.