-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: atomic values getting invalid spans (#327)
- Fixed an issue where atomic values would be matched with all trailing characters up until the next closing.
- Loading branch information
Showing
6 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Define the JSON input for all query test cases. | ||
[input] | ||
# Short description of the input structure. | ||
description = "Simple object with a long number value" | ||
# Set to true only if your specific test input is fully compressed (no extraneous whitespace). | ||
is_compressed = false | ||
|
||
# Inline JSON document. | ||
[input.source] | ||
json_string = ''' | ||
{ | ||
"a": { | ||
"b": null | ||
}, | ||
"c": null, | ||
"d": 4571735769194290270, | ||
"e": "abcdefghijklmnopqrstuvwxyz" | ||
} | ||
''' | ||
|
||
# Define queries to test on the input. | ||
[[queries]] | ||
# Valid JSONPath query string. | ||
query = "$..*" | ||
# Short descritpion of the query semantics. | ||
description = "select all subdocuments" | ||
|
||
[queries.results] | ||
# Number of expected matches. | ||
count = 5 | ||
# Byte locations of spans of all matches, in order. | ||
spans = [[11, 36], [26, 30], [47, 51], [62, 81], [92, 120]] | ||
# Stringified values of all matches, verbatim as in the input, | ||
# in the same order as above. | ||
nodes = ['''{ | ||
"b": null | ||
}''', 'null', 'null', '4571735769194290270', '"abcdefghijklmnopqrstuvwxyz"'] |