Permalink
Browse files

[spec] Fix S29/chomp.t test plan, add fudge for chomp with named argu…

…ment.

git-svn-id: http://svn.pugscode.org/pugs@25019 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent c84935c commit 389ca7c33c99def1f949f9f95d23cbca4c46ddb2 bacek committed Jan 25, 2009
Showing with 2 additions and 28 deletions.
  1. +2 −28 S29-str/chomp.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 32;
+plan 13;
=begin pod
@@ -25,6 +25,7 @@ Basic tests for the chomp() builtin
is($foo, 'foo', 'our variable is chomped correctly');
$foo .= chomp;
is($foo, 'foo', 'our variable is chomped again with no effect');
+ #?rakudo skip "chomp with named argument"
is(chomp(:string("station\n")), 'station', 'chomp works with a named argument');
}
@@ -68,30 +69,3 @@ Basic tests for the chomp() builtin working on an array of strings
=end pod
-# L<S29/Str/=item chomp>
-
-# Also see L<"http://use.perl.org/~autrijus/journal/25351">
-# &chomp and &wrap are now nondestructive; chomp returns the chomped part,
-# which can be defined by the filehandle that obtains the default string at
-# the first place. To get destructive behaviour, use the .= form.
-# Since currently the behaviour with regards to arrays is not defined, I'm
-# assuming the correct behaviour is an extension of the behaviour for
-# a single string.
-
-{
- my @foo = ("foo\n","bar\n","baz\n");
- chomp(@foo);
- is(@foo[0], "foo\n", '1st element was not yet chomped');
- is(@foo[1], "bar\n", '2nd element was not yet chomped');
- is(@foo[2], "baz\n", '3rd element was not yet chomped');
- @foo .= chomp;
- #?rakudo 6 todo 'chomp on lists'
- is(@foo[0], 'foo', '1st element chomped correctly');
- is(@foo[1], 'bar', '2nd element chomped correctly');
- is(@foo[2], 'baz', '3rd element chomped correctly');
- @foo .= chomp;
- is(@foo[0], 'foo', '1st element is chomped again with no effect');
- is(@foo[1], 'bar', '2nd element is chomped again with no effect');
- is(@foo[2], 'baz', '3rd element is chomped again with no effect');
-}
-

0 comments on commit 389ca7c

Please sign in to comment.