aboutsummaryrefslogtreecommitdiffstats
path: root/tests/common
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-01-01 06:21:11 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-01-01 06:21:11 +0100
commit463f6bd5a7f74827427b431452b0720f7be3bd62 (patch)
treec0dba760e5f7ff0df2aafc916c4bb2f41b07ece4 /tests/common
parent2442ee791e0ab49e1897b45191e021b81dd8be3b (diff)
downloadblogc-463f6bd5a7f74827427b431452b0720f7be3bd62.tar.gz
blogc-463f6bd5a7f74827427b431452b0720f7be3bd62.tar.bz2
blogc-463f6bd5a7f74827427b431452b0720f7be3bd62.zip
config-parser: only allow double-quoted values
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common/check_config_parser.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/common/check_config_parser.c b/tests/common/check_config_parser.c
index 7c3cb4a..f7197fe 100644
--- a/tests/common/check_config_parser.c
+++ b/tests/common/check_config_parser.c
@@ -537,12 +537,12 @@ test_config_quoted_values(void **state)
assert_string_equal(bc_config_get(c, "foo", "a"), "lol");
assert_string_equal(bc_config_get(c, "foo", "b"), "lo\"l");
assert_string_equal(bc_config_get(c, "foo", "c"), "lo'l");
- assert_string_equal(bc_config_get(c, "foo", "d"), "lol");
- assert_string_equal(bc_config_get(c, "foo", "e"), "lo'l");
- assert_string_equal(bc_config_get(c, "foo", "f"), "lo\"l");
+ assert_string_equal(bc_config_get(c, "foo", "d"), "'lol'");
+ assert_string_equal(bc_config_get(c, "foo", "e"), "'lo'l'");
+ assert_string_equal(bc_config_get(c, "foo", "f"), "'lo\"l'");
assert_string_equal(bc_config_get(c, "foo", "g"), "\\asd");
assert_string_equal(bc_config_get(c, "foo", "h"), "\\asd");
- assert_string_equal(bc_config_get(c, "foo", "i"), "\\asd");
+ assert_string_equal(bc_config_get(c, "foo", "i"), "'\\asd'");
bc_config_free(c);
a =
@@ -578,17 +578,17 @@ test_config_quoted_values(void **state)
assert_string_equal(bar[0], "lol");
assert_string_equal(bar[1], "lo\"l");
assert_string_equal(bar[2], "lo'l");
- assert_string_equal(bar[3], "lol");
- assert_string_equal(bar[4], "lo'l");
- assert_string_equal(bar[5], "lo\"l");
+ assert_string_equal(bar[3], "'lol'");
+ assert_string_equal(bar[4], "'lo'l'");
+ assert_string_equal(bar[5], "'lo\"l'");
assert_string_equal(bar[6], "\\asd");
assert_string_equal(bar[7], "\\asd");
- assert_string_equal(bar[8], "\\asd");
+ assert_string_equal(bar[8], "'\\asd'");
assert_null(bar[9]);
bc_strv_free(bar);
bar = bc_config_get_list(c, "bar");
assert_non_null(bar);
- assert_string_equal(bar[0], "lol = hehe");
+ assert_string_equal(bar[0], "'lol = hehe'");
assert_string_equal(bar[1], " asdasdadssad ");
assert_null(bar[2]);
bc_strv_free(bar);