Hi,
the attached patch shows a problem with chomp.
Output:
[EMAIL PROTECTED]:~/projekte/pugs$ ./pugs -Iblib6/lib
t/builtins/strings/chomp.t
1..12
ok 1 - our variable is chomped correctly
ok 2 - our variable is chomped again with no effect
ok 3 - our variable is chomped correctly
ok 4 - our variable is chomped again correctly
ok 5 - our variable is chomped again with no effect
ok 6 - our variable is chomped correctly
ok 7 - our variable is chomped again with no effect
ok 8 - our variable is chomped with no effect
ok 9 - chomp returns the chomped value
ok 10 - and our variable is chomped correctly
# Looks like you planned 12 tests, but ran 10
*** Can't modify constant item: VStr "blub\n"
at t/builtins/strings/chomp.t line 57, column 27-38
Index: t/builtins/strings/chomp.t
===================================================================
--- t/builtins/strings/chomp.t (revision 4093)
+++ t/builtins/strings/chomp.t (working copy)
@@ -3,7 +3,7 @@
use v6;
use Test;
-plan 10;
+plan 12;
=pod
@@ -52,3 +52,10 @@
is($foo, 'foo', 'and our variable is chomped correctly');
}
+{
+ for "blub\n\n" -> $foo {
+ my $chomped_foo = chomp($foo);
+ is($chomped_foo, "\n", 'chomp returns the chomped value in for loop');
+ is($foo, "blub\n", 'and our variable is chomped correctly in for loop');
+ }
+}