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

Should error on missing closing quote #403

Closed
humphd opened this issue Dec 9, 2021 · 2 comments · Fixed by #407
Closed

Should error on missing closing quote #403

humphd opened this issue Dec 9, 2021 · 2 comments · Fixed by #407
Labels
bug Something isn't working
Milestone

Comments

@humphd
Copy link

humphd commented Dec 9, 2021

Using hurl v1.4.0, when I run this test, it passes. I think it should error, since I haven't closed the quote after "not found:

GET http://localhost:8080/not-found

HTTP/1.1 404
[Asserts]
# NOTE: missing closing quote here doesn't cause an error
jsonpath "$.error.message" == "not found
@jcamiel
Copy link
Collaborator

jcamiel commented Dec 9, 2021

Yes exactly, it it not syntactically correct and should have been in error!
Shameful bug, thanks for spotting it @humphd (the bug is still present on master)

@jcamiel jcamiel added the bug Something isn't working label Dec 9, 2021
@jcamiel jcamiel added this to the 1.6.0 milestone Dec 9, 2021
@fabricereix
Copy link
Collaborator

Thanks for reporting. I can't believe we had not caught this one before.

With the fix, it will produce the following error

error: Parsing literal
  --> test.hurl:6:41
   |
 6 | jsonpath "$.error.message" == "not found
   |                                         ^ expecting '"'
   |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants