-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cover existence tests in logical expressions #65
Conversation
tests/filter.json
Outdated
{ | ||
"name": "exists and exists, data false", | ||
"selector" : "$[[email protected]&&@.b]", | ||
"document" : [{"a": false, "b": false}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an item here that doesn't match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case has been updated to include non-matching data.
tests/filter.json
Outdated
{ | ||
"name": "exists or exists, data false", | ||
"selector" : "$[[email protected]||@.b]", | ||
"document" : [{"a": false}, {"b": false}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-matching data has been added to this test case, plus data that matches one side of the or expression.
0647adf
to
af48f89
Compare
I'll run these in my lib tomorrow. Then I'll merge. |
Looks good. Thanks. |
Test that singular filter queries are evaluated as existence tests when they are part of a logical expression, but not involving a comparison expression.
This was a bug for me. I was eagerly unwrapping singular node lists before evaluating comparison expression and logical expressions.