Split man.test to make tests pass without oniguruma (#2722)
This commit is contained in:
1 parent
4b3090a9ab
commit
9e4c71558a
11 files changed
+91
-71
No files matched your search
Generated
-44
@@ -564,10 +564,6 @@ implode
|
||||
[65, 66, 67]
|
||||
"ABC"
|
||||
|
||||
split(", ")
|
||||
"a, b,c,d, e, "
|
||||
["a","b,c,d","e",""]
|
||||
|
||||
join(", ")
|
||||
["a","b,c,d","e"]
|
||||
"a, b,c,d, e"
|
||||
@@ -612,10 +608,6 @@ walk(if type == "array" then sort else . end)
|
||||
[[4, 1, 7], [8, 5, 2], [3, 6, 9]]
|
||||
[[1,4,7],[2,5,8],[3,6,9]]
|
||||
|
||||
walk( if type == "object" then with_entries( .key |= sub( "^_+"; "") ) else . end )
|
||||
[ { "_a": { "__b": 2 } } ]
|
||||
[{"a":{"b":2}}]
|
||||
|
||||
$ENV.PAGER
|
||||
null
|
||||
"less"
|
||||
@@ -755,42 +747,6 @@ true
|
||||
["1", "invalid", "3", 4]
|
||||
[1, 3, 4]
|
||||
|
||||
test("foo")
|
||||
"foo"
|
||||
true
|
||||
|
||||
.[] | test("a b c # spaces are ignored"; "ix")
|
||||
["xabcd", "ABC"]
|
||||
true
|
||||
true
|
||||
|
||||
match("(abc)+"; "g")
|
||||
"abc abc"
|
||||
{"offset": 0, "length": 3, "string": "abc", "captures": [{"offset": 0, "length": 3, "string": "abc", "name": null}]}
|
||||
{"offset": 4, "length": 3, "string": "abc", "captures": [{"offset": 4, "length": 3, "string": "abc", "name": null}]}
|
||||
|
||||
match("foo")
|
||||
"foo bar foo"
|
||||
{"offset": 0, "length": 3, "string": "foo", "captures": []}
|
||||
|
||||
match(["foo", "ig"])
|
||||
"foo bar FOO"
|
||||
{"offset": 0, "length": 3, "string": "foo", "captures": []}
|
||||
{"offset": 8, "length": 3, "string": "FOO", "captures": []}
|
||||
|
||||
match("foo (?<bar123>bar)? foo"; "ig")
|
||||
"foo bar foo foo foo"
|
||||
{"offset": 0, "length": 11, "string": "foo bar foo", "captures": [{"offset": 4, "length": 3, "string": "bar", "name": "bar123"}]}
|
||||
{"offset": 12, "length": 8, "string": "foo foo", "captures": [{"offset": -1, "length": 0, "string": null, "name": "bar123"}]}
|
||||
|
||||
[ match("."; "g")] | length
|
||||
"abc"
|
||||
3
|
||||
|
||||
capture("(?<a>[a-z]+)-(?<n>[0-9]+)")
|
||||
"xyzzy-14"
|
||||
{ "a": "xyzzy", "n": "14" }
|
||||
|
||||
.bar as $x | .foo | . + $x
|
||||
{"foo":10, "bar":200}
|
||||
210
|
||||
|
||||
Reference in new issue
Block a user