From 9fa2173825d14053d5ac2adb62b655c50f96aff0 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sat, 30 Nov 2013 00:44:30 -0600 Subject: [PATCH] Test ltrimstr and rtrimstr functions --- tests/all.test | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/all.test b/tests/all.test index 836bc75..2af1e1c 100644 --- a/tests/all.test +++ b/tests/all.test @@ -591,6 +591,14 @@ def inc(x): x |= .+1; inc(.[].a) ["fo", "foo", "barfoo", "foobar", "barfoob"] [false, true, true, false, false] +[.[]|ltrimstr("foo")] +["fo", "foo", "barfoo", "foobar", "afoo"] +["fo","","barfoo","bar","afoo"] + +[.[]|rtrimstr("foo")] +["fo", "foo", "barfoo", "foobar", "foob"] +["fo","","bar","foobar","foob"] + [.[]|split(",")] ["a, bc, def, ghij, jklmn, a,b, c,d, e,f", "a,b,c,d, e,f,g,h"] [["a"," bc"," def"," ghij"," jklmn"," a","b"," c","d"," e","f"],["a","b","c","d"," e","f","g","h"]] -- 2.40.0