mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
json: set state on final bare string
When we run out of chars and are inside a bare string, set our state so that the next round will continue instead of looping forever.
This commit is contained in:
parent
49d11acde0
commit
799bc13c85
2 changed files with 17 additions and 5 deletions
|
|
@ -222,6 +222,16 @@ static void test_new_string(void)
|
|||
spa_assert(!strcmp(pw_properties_get(props, "empty"), ""));
|
||||
|
||||
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