add test for multiple consecutive line continuations

Wed, 10 Dec 2025 23:27:32 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 10 Dec 2025 23:27:32 +0100
changeset 1570
8fd491bc2940
parent 1569
b5d896ad5e75
child 1571
25ead2ffb9b5

add test for multiple consecutive line continuations

tests/test_properties.c file | annotate | diff | comparison | revisions
--- a/tests/test_properties.c	Wed Dec 10 23:17:00 2025 +0100
+++ b/tests/test_properties.c	Wed Dec 10 23:27:32 2025 +0100
@@ -390,7 +390,8 @@
         "key2 = normal\n"
         "key3 = multiline \\\n  trim  \n"
         "key4 = m1\\\nm2\\\n  m3\\\nm4  \n"
-        "key5 = no\\continuation\n";
+        "key5 = no\\continuation\n"
+        "key6 = multiple \\\n \\\n \\\n continuations\n";
     
     CxProperties prop;
     cxPropertiesInitDefault(&prop);
@@ -420,6 +421,10 @@
         CX_TEST_ASSERT(cxPropertiesNext(&prop, &key,  &value) == CX_PROPERTIES_NO_ERROR);
         CX_TEST_ASSERT(!cx_strcmp(key, "key5"));
         CX_TEST_ASSERT(!cx_strcmp(value, "no\\continuation"));
+
+        CX_TEST_ASSERT(cxPropertiesNext(&prop, &key,  &value) == CX_PROPERTIES_NO_ERROR);
+        CX_TEST_ASSERT(!cx_strcmp(key, "key6"));
+        CX_TEST_ASSERT(!cx_strcmp(value, "multiple continuations"));
     }
     
     cxPropertiesDestroy(&prop);

mercurial