Skip to content

Commit 0b2d763

Browse files
authored
Merge pull request #9 from burtcorp/backslash-in-raw-string
Add tests that cover backslashes in raw strings
2 parents 5cd1e78 + c0f7923 commit 0b2d763

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/literal.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@
184184
"comment": "Can escape the single quote",
185185
"expression": "'foo\\'bar'",
186186
"result": "foo'bar"
187+
},
188+
{
189+
"comment": "Backslash not followed by single quote is treated as any other character",
190+
"expression": "'\\z'",
191+
"result": "\\z"
192+
},
193+
{
194+
"comment": "Backslash not followed by single quote is treated as any other character",
195+
"expression": "'\\\\'",
196+
"result": "\\\\"
187197
}
188198
]
189199
}

0 commit comments

Comments
 (0)