eiiches / jackson-jq

jq for Jackson Java JSON Processor
Other
282 stars 37 forks source link

Update test suites and exclusion list #239

Closed itchyny closed 1 year ago

itchyny commented 1 year ago

This PR updates the test suites from the jq repository, and also updates the exclusion list.

eiiches commented 1 year ago

Thanks for improving tests!

Can you exclude this test case for now? The test tries to compare the output of stedolan/jq and jackson-jq (if jq cli is available on the machine), but stedolan/jq 1.6 has a bug that causes the test to time out.

- q: 'index("")'
  in: ""
  out:
  - null
  v: '[1.6, 1.6]'

Or, preferably, you can change the download script like below to mark the index("") test as v1.7, so that the test will not be executed on stedolan/jq 1.6.

emit_tests('[1.5, 1.5]', load_jq_tests_from_url('https://raw.githubusercontent.com/stedolan/jq/jq-1.5/tests/jq.test'), 'tests/jq-1.5.yaml')
emit_tests('[1.5, 1.5]', load_jq_tests_from_url('https://raw.githubusercontent.com/stedolan/jq/jq-1.5/tests/onig.test'), 'tests/jq-1.5-onig.yaml')
emit_tests('[1.5, 1.5]', load_jq_manual('https://raw.githubusercontent.com/stedolan/jq/master/docs/content/manual/v1.5/manual.yml'), 'tests/jq-1.5-manual.yaml')

emit_tests('[1.6, 1.6]', load_jq_tests_from_url('https://raw.githubusercontent.com/stedolan/jq/jq-1.6/tests/jq.test'), 'tests/jq-1.6.yaml')
emit_tests('[1.6, 1.6]', load_jq_tests_from_url('https://raw.githubusercontent.com/stedolan/jq/jq-1.6/tests/onig.test'), 'tests/jq-1.6-onig.yaml')
emit_tests('[1.6, 1.6]', load_jq_manual('https://raw.githubusercontent.com/stedolan/jq/master/docs/content/manual/v1.6/manual.yml'), 'tests/jq-1.6-manual.yaml')

emit_tests('[1.7, 1.7]', load_jq_tests_from_url('https://raw.githubusercontent.com/stedolan/jq/master/tests/jq.test'), 'tests/jq-1.7.yaml')
emit_tests('[1.7, 1.7]', load_jq_tests_from_url('https://raw.githubusercontent.com/stedolan/jq/master/tests/onig.test'), 'tests/jq-1.7-onig.yaml')
emit_tests('[1.7, 1.7]', load_jq_manual('https://raw.githubusercontent.com/stedolan/jq/master/docs/content/manual/manual.yml'), 'tests/jq-1.7-manual.yaml')
itchyny commented 1 year ago

Hi, I updated the download scripts to save the tests from the master branch as jq-latest-*.yaml, and assert the test cases assuming that jq command (with no version suffix) to be the latest version. We cannot tell what version the next release will be, but we can mark them as (1.6, ] as for now. What do you think?