Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect jq test suite digressions #17

Open
sshine opened this issue Oct 9, 2019 · 0 comments
Open

Collect jq test suite digressions #17

sshine opened this issue Oct 9, 2019 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@sshine
Copy link
Owner

sshine commented Oct 9, 2019

This is a collection of digressions in the jq test suite.

They are collected here in a similar fashion to #4.

  • jq segfaults when (0) is a key in a jq object:
    $ jq -n '{(0):1}'
    jq: jv.c:1110: jv_object_set: Assertion `jv_get_kind(key) == JV_KIND_STRING' failed.
    [1]    24306 abort (core dumped)  jq -n '{(0):1}'
    
    This appears to be a digression from the following case in tests/jq.test:
    %%FAIL
    {(0):1}
    jq: error: Cannot use number (0) as object key at <top-level>, line 1:
    
    Whereas input JSON with non-string keys in objects gives good errors:
    $ jq . <<< '{0:1}'
    parse error: Object keys must be strings at line 1, column 3
    
@sshine sshine added the documentation Improvements or additions to documentation label Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant