diff options
author | David Tolnay <dtolnay@gmail.com> | 2015-10-17 22:44:40 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2015-10-25 12:40:15 -0700 |
commit | e17ccf229723d776c0d49341665256b855c70bda (patch) | |
tree | 4ad441a1113162002daae2fcedec95e1834e03d4 /tests | |
parent | 8eb1367ca44e772963e704a700ef72ae2e12babd (diff) |
Support numbers and boolean in join (fix #930)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/jq.test | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/tests/jq.test b/tests/jq.test index 46a7bc29..4ca1f66b 100644 --- a/tests/jq.test +++ b/tests/jq.test @@ -1259,13 +1259,29 @@ try -. catch . "very-long-string" "string (\"very-long-...) cannot be negated" -try join(",") catch . -["1",2] -"string (\",\") and number (2) cannot be added" +join(",") +["1",2,true,false,3.4] +"1,2,true,false,3.4" + +.[] | join(",") +[[], [null], [null,null], [null,null,null]] +"" +"" +"," +",," + +.[] | join(",") +[["a",null], [null,"a"]] +"a," +",a" try join(",") catch . ["1","2",{"a":{"b":{"c":33}}}] -"string (\",\") and object ({\"a\":{\"b\":{...) cannot be added" +"string (\"1,2,\") and object ({\"a\":{\"b\":{...) cannot be added" + +try join(",") catch . +["1","2",[3,4,5]] +"string (\"1,2,\") and array ([3,4,5]) cannot be added" {if:0,and:1,or:2,then:3,else:4,elif:5,end:6,as:7,def:8,reduce:9,foreach:10,try:11,catch:12,label:13,import:14,include:15,module:16} null |