Skip to content

Commit

Permalink
Show that iniparser fails to parse sections containing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoellendorf committed May 14, 2024
1 parent 568ae42 commit d4f1ea3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_iniparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d4f1ea3

Please sign in to comment.