-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert compliance tests to yaml and clean up tests (#69)
* Convert compliance tests to yaml and clean up tests * Add "comment" field to function tests * Added instructions for running tests. * Renamed grammar compliance schema file. * Clean up error output * Handle non-exact error output * Clean up more failing tests Co-authored-by: springcomp <[email protected]>
- Loading branch information
1 parent
1ce0d40
commit e47e01e
Showing
67 changed files
with
4,917 additions
and
6,520 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# JMESPath Compliance Tests | ||
|
||
This repo contains a suite of JMESPath compliance tests. JMESPath's implementations can use these tests in order to verify their | ||
implementation adheres to the JMESPath spec. | ||
|
||
## Test Organization | ||
|
||
`grammar/*.yml` contains tests for general grammar functionality. These documents must validate against the `grammar_schema.yml`. | ||
|
||
`functions/*.yml` contains a description of each function accompanied by a suite of tests/examples. These documents must validate against the `function_schema.yml`. | ||
|
||
## Running Tests | ||
|
||
This repository include a Python `jp-compliance` executable test runner. | ||
|
||
``` | ||
jp-compliance <executable> <test yaml> [<test name>..] | ||
``` | ||
|
||
This will run the JMESPath compliance tests against a JMESPath executable. | ||
The executable must accept the query as the only argument, and the input data on stdin. | ||
The result must be printed to stdout as JSON. | ||
Errors must be printed to stderr and match expected values. | ||
|
||
If your executable requires additional arguments, wrap it in an executable script. | ||
|
||
The test YAML must validate against function_schema.yml or test_schema.yml. | ||
|
||
Additionally, test names can be supplied to only execute matching tests |
Oops, something went wrong.