mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
json: handle incomplete strings
If we run to the end of the string and the string is not closed, assume it closed.
This commit is contained in:
parent
799bc13c85
commit
d09cb1f05b
2 changed files with 14 additions and 2 deletions
|
|
@ -232,6 +232,16 @@ static void test_new_string(void)
|
|||
spa_assert(!strcmp(pw_properties_get(props, "bar"), "baz"));
|
||||
|
||||
pw_properties_free(props);
|
||||
|
||||
props = pw_properties_new_string("foo=bar bar=\"baz");
|
||||
spa_assert(props != NULL);
|
||||
spa_assert(props->flags == 0);
|
||||
spa_assert(props->dict.n_items == 2);
|
||||
|
||||
spa_assert(!strcmp(pw_properties_get(props, "foo"), "bar"));
|
||||
spa_assert(!strcmp(pw_properties_get(props, "bar"), "baz"));
|
||||
|
||||
pw_properties_free(props);
|
||||
}
|
||||
|
||||
static void test_update(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue