diff options
author | Urban Müller | 2024-05-03 16:00:44 +0200 |
---|---|---|
committer | Urban Müller | 2024-05-03 16:00:44 +0200 |
commit | 479163befe8bb539ba691b1ff6e0b6f455e4b26b (patch) | |
tree | 814c767cca98359ec89a9ffbd654869cbb019032 | |
parent | b0cb04f0c22e2a72c62fd40daf1e989e88f86947 (diff) | |
download | itools-479163befe8bb539ba691b1ff6e0b6f455e4b26b.tar.gz itools-479163befe8bb539ba691b1ff6e0b6f455e4b26b.tar.bz2 itools-479163befe8bb539ba691b1ff6e0b6f455e4b26b.zip |
test keys as well
-rwxr-xr-x | test/it_pipe.t | 8 |
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() |