From e6a5137690fb94f6379499f76a4a07811922a379 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 5 Jun 2022 14:09:43 +0100 Subject: fixed comments not working when preceeded by whitespace --- test/parseconf.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/parseconf.sh') diff --git a/test/parseconf.sh b/test/parseconf.sh index ab28721..1cd668f 100755 --- a/test/parseconf.sh +++ b/test/parseconf.sh @@ -50,6 +50,20 @@ key4 value4 [ "$retval" = "key2:value2" ] } +test_comments_parsing() { + config=" +#key1 value1 + #key2 value2 +# this is a comment +#key4 value4 +dict { + #nothing here +} + " + retval=$(printf "$config" | ${PARSECONF} ) + [ "x$retval" = "x" ] +} + test_list_parsing() { config=" -- cgit v1.2.1