| 388 const char *str = |
388 const char *str = |
| 389 "key1 = multiline \\\nvalue\n" |
389 "key1 = multiline \\\nvalue\n" |
| 390 "key2 = normal\n" |
390 "key2 = normal\n" |
| 391 "key3 = multiline \\\n trim \n" |
391 "key3 = multiline \\\n trim \n" |
| 392 "key4 = m1\\\nm2\\\n m3\\\nm4 \n" |
392 "key4 = m1\\\nm2\\\n m3\\\nm4 \n" |
| 393 "key5 = no\\continuation\n"; |
393 "key5 = no\\continuation\n" |
| |
394 "key6 = multiple \\\n \\\n \\\n continuations\n"; |
| 394 |
395 |
| 395 CxProperties prop; |
396 CxProperties prop; |
| 396 cxPropertiesInitDefault(&prop); |
397 cxPropertiesInitDefault(&prop); |
| 397 |
398 |
| 398 cxstring key; |
399 cxstring key; |
| 418 CX_TEST_ASSERT(!cx_strcmp(value, "m1m2m3m4")); |
419 CX_TEST_ASSERT(!cx_strcmp(value, "m1m2m3m4")); |
| 419 |
420 |
| 420 CX_TEST_ASSERT(cxPropertiesNext(&prop, &key, &value) == CX_PROPERTIES_NO_ERROR); |
421 CX_TEST_ASSERT(cxPropertiesNext(&prop, &key, &value) == CX_PROPERTIES_NO_ERROR); |
| 421 CX_TEST_ASSERT(!cx_strcmp(key, "key5")); |
422 CX_TEST_ASSERT(!cx_strcmp(key, "key5")); |
| 422 CX_TEST_ASSERT(!cx_strcmp(value, "no\\continuation")); |
423 CX_TEST_ASSERT(!cx_strcmp(value, "no\\continuation")); |
| |
424 |
| |
425 CX_TEST_ASSERT(cxPropertiesNext(&prop, &key, &value) == CX_PROPERTIES_NO_ERROR); |
| |
426 CX_TEST_ASSERT(!cx_strcmp(key, "key6")); |
| |
427 CX_TEST_ASSERT(!cx_strcmp(value, "multiple continuations")); |
| 423 } |
428 } |
| 424 |
429 |
| 425 cxPropertiesDestroy(&prop); |
430 cxPropertiesDestroy(&prop); |
| 426 } |
431 } |
| 427 |
432 |