mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Add test for Javascript literal with an unpaired surrogate character
This commit is contained in:
1
javascript/ql/test/library-tests/literals/test.expected
Normal file
1
javascript/ql/test/library-tests/literals/test.expected
Normal file
@@ -0,0 +1 @@
|
|||||||
|
| test.js:1:9:1:16 | "\\ud800" | \ufffd | "\\ud800" | \ufffd | test.js:1:9:1:16 | "\\ud800" |
|
||||||
1
javascript/ql/test/library-tests/literals/test.js
Normal file
1
javascript/ql/test/library-tests/literals/test.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
let s = "\ud800";
|
||||||
5
javascript/ql/test/library-tests/literals/test.ql
Normal file
5
javascript/ql/test/library-tests/literals/test.ql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import javascript
|
||||||
|
|
||||||
|
from StringLiteral sl
|
||||||
|
where sl.getFile().getBaseName() = "test.js"
|
||||||
|
select sl, sl.getValue(), sl.getRawValue(), sl.getStringValue(), sl.getUnderlyingValue()
|
||||||
Reference in New Issue
Block a user