Commit a3f73b0c authored by Shunichi Shinohara's avatar Shunichi Shinohara
Browse files

Add test cases related to space characters

Showing with 27 additions and 0 deletions
+27 -0
......@@ -257,6 +257,33 @@ one_section_title_and_one_prop_test_() ->
parse_string(
"[title] \n"
"key1=value1;continue\n"
)),
%% key has trailing spaces
?_assertEqual({ok, [
{{"title", default},
[{"key1", "value1"}]}
]},
parse_string(
"[title] \n"
"key1 =value1\n"
)),
%% value has preceding and trailing spaces
?_assertEqual({ok, [
{{"title", default},
[{"key1", "value1"}]}
]},
parse_string(
"[title] \n"
"key1= value1 \n"
)),
%% value has characters which can not used in titles or keys
?_assertEqual({ok, [
{{"title", default},
[{"key1", "value1$% '""#!+*=@/:+"}]}
]},
parse_string(
"[title]\n"
"key1=value1$% '""#!+*=@/:+\n"
))
]}.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment