From: Daniel Stenberg Date: Wed, 31 Dec 2025 10:06:36 +0000 (+0100) Subject: test1664: extend with more tests for curlx_str_quotedword X-Git-Tag: curl-8_18_0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfa5857c44a7488cf1e8f8475e1b74575259e02e;p=thirdparty%2Fcurl.git test1664: extend with more tests for curlx_str_quotedword Closes #20123 --- diff --git a/tests/data/test1664 b/tests/data/test1664 index 42c4982d57..ccb0579be7 100644 --- a/tests/data/test1664 +++ b/tests/data/test1664 @@ -50,9 +50,14 @@ curlx_str_quotedword 6: (""perfect"") 0, "perfect" [7], line 9 7: (""p r e t"") 0, "p r e t" [7], line 9 8: (""perfec\"") 1, "" [0], line 0 -9: ("""") 0, "" [0], line 2 -10: ("") 3, "" [0], line 0 -11: (""longerth"") 1, "" [0], line 0 +9: (""trail\""") 0, "trail\"" [7], line 9 +10: (""trail2\""") 1, "" [0], line 0 +11: (""trail33\""") 1, "" [0], line 0 +12: (""0\\\\\\"") 0, "0\\\\\\" [7], line 9 +13: (""1\\\\\\\"") 1, "" [0], line 0 +14: ("""") 0, "" [0], line 2 +15: ("") 3, "" [0], line 0 +16: (""longerth"") 1, "" [0], line 0 curlx_str_single 0: ("a") 0, line 1 1: ("aa") 0, line 1 diff --git a/tests/unit/unit1664.c b/tests/unit/unit1664.c index e4cec3c081..b434462feb 100644 --- a/tests/unit/unit1664.c +++ b/tests/unit/unit1664.c @@ -88,6 +88,11 @@ static CURLcode test_unit1664(const char *arg) "\"perfect\"", "\"p r e t\"", "\"perfec\\\"", + "\"trail\\\"\"", + "\"trail2\\\"\"", + "\"trail33\\\"\"", + "\"0\\\\\\\\\\\\\"", + "\"1\\\\\\\\\\\\\\\"", "\"\"", "", "\"longerth\"",