From 9e266afd380229e578c1b4dc2e32b5506dd99e57 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 1 Jun 2017 17:51:02 +0200 Subject: tests for it::filter --- tests/it.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/it.t b/tests/it.t index 77bab72..8d840ef 100755 --- a/tests/it.t +++ b/tests/it.t @@ -439,6 +439,10 @@ is(it::map('2*$v', [3, 4, 5], ['keys' => '0,1']), [6, 8, 5]); is(it::map('2*$v', [3, 4, 5], ['keys' => [0,1]]), [6, 8, 5]); is(it::map('2*$v', ['foo' => 1, 'bar' => 2], ['keys' => 'foo']), ['foo' => 2, 'bar' => 2]); +# it::filter +is(it::filter('$v > 2', [1, 5 => 2, 2 => 3]), [2 => 3]); +is(it::filter('$k > 2', [1, 5 => 2, 2 => 3]), [5 => 2]); + is(it::add_dir("foo/bar"), "foo/37/bar"); is(it::add_dir("baz/bar"), "baz/37/bar"); is(it::add_dir("bar"), "./37/bar"); -- cgit v1.2.3