conf: introduce snd_config_load_string()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-12-01 10:14:12 +01:00
parent a95942f1af
commit ebb8a6c7a1
4 changed files with 65 additions and 28 deletions

View file

@ -598,6 +598,22 @@ static void test_evaluate_string(void)
}
}
static void test_load_string(void)
{
const char **cfg, *configs[] = {
"a=1,b=2",
"j 3;z 15;",
"x 0 y -1",
NULL
};
snd_config_t *dst;
for (cfg = configs; *cfg; cfg++) {
ALSA_CHECK(snd_config_load_string(&dst, *cfg, 0));
ALSA_CHECK(snd_config_delete(dst));
}
}
int main(void)
{
test_top();
@ -629,5 +645,6 @@ int main(void)
test_iterators();
test_for_each();
test_evaluate_string();
test_load_string();
return TEST_EXIT_CODE();
}