Two sub bugs fixed; two new gsub tests have been added.

./jq --run-tests < tests/onig.test
has been run successfully:

...
Testing 'gsub("a";"b")' at line number 70
Testing 'gsub( "(.*)"; "";  "x")' at line number 74
...
22 of 22 tests passed (0 malformed)
This commit is contained in:
pkoppstein authored and Nicolas Williams committed 2015-12-09 15:28:01 -06:00
1 parent ec583deefa
commit ad8d1a8cc8
2 files changed
+12 -4

No files matched your search

+8
View File
@@ -67,6 +67,14 @@ gsub("(?<d>\\d)"; ":\(.d);")
"a1b2"
"a:1;b:2;"
gsub("a";"b")
"aaaaa"
"bbbbb"
gsub( "(.*)"; ""; "x")
""
""
[.[] | scan(", ")]
["a,b, c, d, e,f",", a,b, c, d, e,f, "]
[", ",", ",", ",", ",", ",", ",", ",", "]