summaryrefslogtreecommitdiff
path: root/tests/it_pipe.t
diff options
context:
space:
mode:
authorUrban Müller2018-06-21 16:42:32 +0200
committerUrban Müller2018-06-21 16:43:32 +0200
commit3dabbbd5325c9fad9582cd44b1da68dece78eaa0 (patch)
tree92d951b948f0e01dc6b7ae3f11b9c03034edb69a /tests/it_pipe.t
parent455b15f7a850a58ef667ad170732769043eb1522 (diff)
downloaditools-3dabbbd5325c9fad9582cd44b1da68dece78eaa0.tar.gz
itools-3dabbbd5325c9fad9582cd44b1da68dece78eaa0.tar.bz2
itools-3dabbbd5325c9fad9582cd44b1da68dece78eaa0.zip
no reason for different naming
Diffstat (limited to 'tests/it_pipe.t')
-rwxr-xr-xtests/it_pipe.t18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/it_pipe.t b/tests/it_pipe.t
deleted file mode 100755
index 16e2c29..0000000
--- a/tests/it_pipe.t
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/www/server/bin/php
-<?php
-
-# csv()
-is(json_encode((new it_pipe(['data' => ["a\tb", "1\t2"]]))->csv()), '[{"a":"1","b":"2"}]');
-is(json_encode((new it_pipe(['data' => ["a;b", "1;2"]]))->csv()), '[{"a":"1","b":"2"}]');
-is(json_encode((new it_pipe(['data' => ["a,b", "1,2"]]))->csv()), '[{"a":"1","b":"2"}]');
-is(json_encode((new it_pipe(['data' => ["\t", "1\t2"]]))->csv()), '[{"field0":"1","field1":"2"}]');
-is(json_encode((new it_pipe(['data' => ["a\tb", "1\t2"]]))->csv("c,d")), '[{"c":"1","d":"2"}]');
-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"}]');
-
-# askey()
-is(json_encode((new it_pipe(['data' => "a\nb\n"]))->askey()), '{"a":true,"b":true}');
-
-# __call() generic funcs
-is((new it_pipe(['data' => [" a a "]]))->trim()->lines[0], "a a");
-is((new it_pipe(['data' => [" a a "]]))->it__match('\w', ['all' => true])->lines[0], ["a", "a"], "test argument in second pos");