From: Lukas Krickl Date: Sat, 18 Nov 2023 05:37:11 +0000 (+0100) Subject: Added tests for unterminated strings X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=da102370618c786463ee7535be68791fd3192846;p=ulas%2F.git Added tests for unterminated strings --- diff --git a/src/test.c b/src/test.c index 9b8d07e..ce9d929 100644 --- 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"); }