@@ -1055,6 +1055,9 @@ void Test_iniparser_quotes(CuTest *tc)
1055
1055
FILE * ini ;
1056
1056
int ret ;
1057
1057
1058
+ /**
1059
+ * Test iniparser_load()
1060
+ */
1058
1061
/* check if section has been written as expected */
1059
1062
dic = iniparser_load (QUOTES_INI_PATH );
1060
1063
@@ -1084,7 +1087,24 @@ void Test_iniparser_quotes(CuTest *tc)
1084
1087
CuAssertStrEquals (tc , "str" , iniparser_getstring (dic ,
1085
1088
QUOTES_INI_SEC ":" QUOTES_INI_ATTR5 , NULL ));
1086
1089
/*
1087
- * test escaping
1090
+ * iniparser_load() supports quotes in attributes
1091
+ */
1092
+ CuAssertStrEquals (tc , "str\\" , iniparser_getstring (dic ,
1093
+ QUOTES_INI_SEC ":" "str\"ing" , NULL ));
1094
+ /*
1095
+ * iniparser_load() does not support semicolon or hash in attributes
1096
+ */
1097
+ CuAssertStrEquals (tc , NULL , iniparser_getstring (dic ,
1098
+ QUOTES_INI_SEC ":" "str;ing" , NULL ));
1099
+ CuAssertStrEquals (tc , NULL , iniparser_getstring (dic ,
1100
+ QUOTES_INI_SEC ":" "str#ing" , NULL ));
1101
+ /*
1102
+ * iniparser_load() does support colon in attributes
1103
+ */
1104
+ CuAssertStrEquals (tc , "str\\" , iniparser_getstring (dic ,
1105
+ QUOTES_INI_SEC ":" "str:ing" , NULL ));
1106
+ /**
1107
+ * test iniparser_set()
1088
1108
*/
1089
1109
create_empty_ini_file (TMP_INI_PATH );
1090
1110
dic = iniparser_load (TMP_INI_PATH );
0 commit comments