From 426edff09c0b77866d209ccfc34eb879982aed64 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 2 Dec 2013 12:19:36 -0600 Subject: [PATCH] Add tests for string index by string and builtins --- tests/all.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/all.test b/tests/all.test index 2af1e1c..71918a6 100644 --- a/tests/all.test +++ b/tests/all.test @@ -599,6 +599,22 @@ def inc(x): x |= .+1; inc(.[].a) ["fo", "foo", "barfoo", "foobar", "foob"] ["fo","","bar","foobar","foob"] +.[","] +"a,bc,def,ghij,klmno" +[1,4,8,13] + +.[", "] +"a,bc,def,ghij,klmno" +[] + +.[", "] +"a,b,, c, d,ef, , ghi, jklmn, o" +[4,7,13,15,20,27] + +[(index(","), rindex(","))] +"a,bc,def,ghij,klmno" +[1,13] + [.[]|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