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

raw-string-escape compliance test is incorrect #15

Closed
springcomp opened this issue Nov 8, 2022 · 0 comments · Fixed by jmespath-community/python-jmespath#10 or jmespath-community/typescript-jmespath#8

Comments

@springcomp
Copy link
Contributor

springcomp commented Nov 8, 2022

Migrated from #14.

The following compliance test is incorrect:

{
"comment": "Backslash not followed by single quote is treated as any other character",
"expression": "'\\\\'",
"result": "\\\\"
}

Instead, this should be

Expression Expressed as JSON Result Comment
'\\' '\\\\' "\\" should follow raw-string-escape grammar rule

Suggested change:

         {
-          "comment": "Backslash not followed by single quote is treated as any other character",
+          "comment": "Can escape backslash",
           "expression": "'\\\\'",
-          "result": "\\\\"
+          "result": "\\"
         }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment