mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Kotlin: Add a test for truncated literals
This commit is contained in:
4
java/ql/test/kotlin/library-tests/trap/literals.expected
Normal file
4
java/ql/test/kotlin/library-tests/trap/literals.expected
Normal file
@@ -0,0 +1,4 @@
|
||||
| long_string.kt:12:31:12:1048605 | long_string.kt:12:31:12:1048605 | 1048575 | ABBBB...BBBBC | StringLiteral |
|
||||
| long_string.kt:13:31:13:1048606 | long_string.kt:13:31:13:1048606 | 1048576 | ABBBB...BBBCD | StringLiteral |
|
||||
| long_string.kt:14:31:14:1048607 | long_string.kt:14:31:14:1048607 | 1048576 | ABBBB...BBBCD | StringLiteral |
|
||||
| long_string.kt:15:31:15:1048608 | long_string.kt:15:31:15:1048608 | 1048576 | ABBBB...BBBCD | StringLiteral |
|
||||
8
java/ql/test/kotlin/library-tests/trap/literals.ql
Normal file
8
java/ql/test/kotlin/library-tests/trap/literals.ql
Normal file
@@ -0,0 +1,8 @@
|
||||
import java
|
||||
|
||||
from Literal l, int len
|
||||
where len = l.getValue().length()
|
||||
select l.getLocation(),
|
||||
len,
|
||||
l.getValue().prefix(5) + "..." + l.getValue().suffix(len - 5),
|
||||
l.getPrimaryQlClasses()
|
||||
17
java/ql/test/kotlin/library-tests/trap/long_string.kt
Normal file
17
java/ql/test/kotlin/library-tests/trap/long_string.kt
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user