summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/it_pipe.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/it_pipe.t b/test/it_pipe.t
index 72847d1..0a36d1c 100755
--- a/test/it_pipe.t
+++ b/test/it_pipe.t
@@ -11,10 +11,10 @@ is(it::pipe(['foo'])->lines(), ["foo"]);
foreach(it::pipe(['a','b','a']) as $i) $x1 .= $i;
is($x1, "aba");
-foreach(it::pipe(['a','b','a'])->filter(fn($x) => $x == 'a') as $i) $x2 .= $i;
-is($x2, "aa");
-foreach(it::pipe(['a','b','a'])->grep('a') as $i) $x3 .= $i;
-is($x3, "aa");
+foreach(it::pipe(['a','b','a'])->filter(fn($x) => $x == 'a') as $k => $v) $x2 .= "$k$v";
+is($x2, "0a1a");
+foreach(it::pipe(['a','b','a'])->grep('a') as $k => $v) $x3 .= "$k$v";
+is($x3, "0a1a");
# csv()