Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fudge and correct indent.t
  • Loading branch information
moritz committed Apr 10, 2012
1 parent 110d111 commit 7051d3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions S32-str/indent.t
Expand Up @@ -68,7 +68,7 @@ is ' quack'.indent(-4),
given 'Excess outdent test for warning' -> $test {
' quack'.indent(-4);
flunk $test;
CATCH { pass $test; }
CONTROL { default { pass $test; } }
}

# Whatever-star
Expand All @@ -92,7 +92,7 @@ is "\t\t!".indent(-1),
"\t" ~ ' ' x ($tab - 1) ~ '!',
'Test that tabs explode from the right';

ok ([==] ((' ' Xx 0..$tab - 1) X~ "\t".indent(-4)),
ok ([eq] ((' ' Xx 0..$tab - 1) X~ "\t".indent(-4)),
'Check that varying amounts of space before a tabstop explode in a visually consistent way';

is " \t!".indent(-1),
Expand Down Expand Up @@ -126,6 +126,7 @@ is "\ta\n b".indent(0),
'.indent(0) should be a no-op';

#?niecza skip "weird scalar input"
#?rakudo skip 'unknown'
is "\ta\n b".indent(1).indent(16).indent(0).indent(*).perl,
"\ta\n b".indent(True).indent('0x10').indent('blah').indent(*).perl,
'.indent accepts weird scalar input and coerces it to Int when necessary';
Expand Down

0 comments on commit 7051d3a

Please sign in to comment.