diff options
author | Christian Schneider | 2021-02-12 12:59:57 +0100 |
---|---|---|
committer | Christian Schneider | 2021-02-12 12:59:57 +0100 |
commit | 93e47c67c7301ef2a86b23d18d0aa4ac39b3ec7f (patch) | |
tree | 34e3c20fa82dd8fbf3a246cf63049f669f02a7fc /test/it_pipe.t | |
parent | c15dc159ceb37c4ee1cf378e1e9ac81aab1181f1 (diff) | |
download | itools-93e47c67c7301ef2a86b23d18d0aa4ac39b3ec7f.tar.gz itools-93e47c67c7301ef2a86b23d18d0aa4ac39b3ec7f.tar.bz2 itools-93e47c67c7301ef2a86b23d18d0aa4ac39b3ec7f.zip |
Fix cols() ignoring some columns, was an exception in PHP 8
Diffstat (limited to 'test/it_pipe.t')
-rwxr-xr-x | test/it_pipe.t | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/it_pipe.t b/test/it_pipe.t index 16e2c29..a3cebd6 100755 --- a/test/it_pipe.t +++ b/test/it_pipe.t @@ -10,6 +10,8 @@ is(json_encode((new it_pipe(['data' => ["a\tb", "1\t2"]]))->csv("c,d")), '[{"c": is(json_encode((new it_pipe(['data' => ["a\tb", "1\t2"]]))->csv(['forceschema' => "c,d"])), '[{"c":"1","d":"2"}]'); is(json_encode((new it_pipe(['data' => ["a b\tb", "1\t2"]]))->csv(['fixcolnames' => true])), '[{"a_b":"1","b":"2"}]'); +is(iterator_to_array((new it_pipe(['data' => ["a b\tb", "1\t2"]]))->cols('c')), [(object)['c' => 'a b'], (object)['c' => '1']], "cols() ignoring some columns"); + # askey() is(json_encode((new it_pipe(['data' => "a\nb\n"]))->askey()), '{"a":true,"b":true}'); |