From d4f1ea3f2ce45aa2546c236cd4ead128fba7857a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=B6llendorf?= Date: Tue, 14 May 2024 18:09:53 +0200 Subject: [PATCH] Show that iniparser fails to parse sections containing whitespaces --- test/test_iniparser.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_iniparser.c b/test/test_iniparser.c index d34d554..134b0c2 100644 --- a/test/test_iniparser.c +++ b/test/test_iniparser.c @@ -678,6 +678,12 @@ void Test_iniparser_line(CuTest *tc) CuAssertIntEquals(tc, LINE_SECTION, iniparser_line("[s]", section, key, val)); CuAssertStrEquals(tc, "s", section); + CuAssertIntEquals(tc, LINE_SECTION, iniparser_line("[section 0]", section, key, val)); + CuAssertStrEquals(tc, "section 0", section); + + CuAssertIntEquals(tc, LINE_SECTION, iniparser_line("[ section 0 ]", section, key, val)); + CuAssertStrEquals(tc, "section 0", section); + CuAssertIntEquals(tc, LINE_SECTION, iniparser_line("[ section ]", section, key, val)); CuAssertStrEquals(tc, "section", section);