Skip to content

Commit

Permalink
Update README with note about compliance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesls committed Dec 5, 2015
1 parent fe07f08 commit e287c64
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,24 +240,46 @@ in quotes, as shown in the example above.
## Testing

The parsing and evaluation of JMESPath expression is done in the
go-jmespath library, which is a dependencty of this project. ``go-jmespath``
go-jmespath library, which is a dependency of this project. ``go-jmespath``
has extensive testing to ensure it is parsing and evaluating JMESPath
expressions correctly.

To ensure that there are no regressions between `go-imespath` and `jp`,
the entire suite of [JMESPath compliance tests](https://github.com/jmespath/jmespath.test)
are run against the `jp` executable.

This repo also include CLI specific test that verify the command line
options and output work as intended. To run these ``jp`` specific
tests, you can run ``make test``:
options and output work as intended.

You can run all of these tests for `jp` by running `make test`:

```
$ make test
# CLI specific test cases.
test/vendor/bats/libexec/bats test/cases
✓ Has valid help output
✓ Can display version
✓ Can search basic expression
✓ Can search subexpr expression
✓ Can read input from file
✓ Can print result unquoted
....
X tests, 0 failures
✓ Bad JMESPath expression has non zero rc
- Large numbers are not printed with scientific notation (skipped)
✓ Can accept expression from file
✓ Can pretty print expr AST
✓ Can sort int array
X tests, 0 failures, 1 skipped
# JMESPath compliance tests, using the jp-compliance
# runner from github.com/jmespath/jmespath.test
test/jp-compliance -d test/compliance/ -e ./jp
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
OK
```

0 comments on commit e287c64

Please sign in to comment.