projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5266451
)
Added tests for unterminated strings
author
Lukas Krickl
<lukas@krickl.dev>
Sat, 18 Nov 2023 05:37:11 +0000
(06:37 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sat, 18 Nov 2023 05:37:11 +0000
(06:37 +0100)
src/test.c
patch
|
blob
|
history
diff --git
a/src/test.c
b/src/test.c
index 9b8d07e92a865baaa754def48715bba64c5fd0b1..ce9d929c946cee431847e791f81f98167fe56f80 100644
(file)
--- a/
src/test.c
+++ b/
src/test.c
@@
-184,8
+184,10
@@
void test_totok(void) {
// string token
ASSERT_STR_TOTOK("test", 0, "\"test\"");
-
+ // string with escape
ASSERT_STR_TOTOK("test\n\"123\"", 0, "\"test\\n\\\"123\\\"\"");
+ // unterminated string
+ ASSERT_STR_TOTOK("test\n\"123\"", -1, "\"test\\n\\\"123\\\"");
TESTEND("totok");
}