From 6042502bc54807df1941bf4d540337cd8b9e5a58 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Wed, 29 May 2024 19:39:02 +0200 Subject: Fix section parsing and line tracking --- test/ini.c | 6 +++++- test/test.ini | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ini.c b/test/ini.c index 06f841a..8e9661c 100644 --- a/test/ini.c +++ b/test/ini.c @@ -23,7 +23,11 @@ void test_ini() /*16*/ " sus \n" /*17*/ "test = multi \\\n" /*18*/ " line \\\n" - /*19*/ " works ; boh \n"; + /*19*/ " works ; boh \n" + /*20*/ "[ section \n" + /*21*/ " test = boh\n" + /*22*/ " [ sus [[ ciao [] si ]\n" + /*23*/ " works = boh \n"; any_ini_t ini; any_ini_init(&ini, src, strlen(src)); diff --git a/test/test.ini b/test/test.ini index 879ca9d..756ff78 100644 --- a/test/test.ini +++ b/test/test.ini @@ -50,3 +50,12 @@ try = if \ breaks \ done \ nicely + + +[ unfinished section + +test2 = 10 + +[ sussy section ] yes ] it is ] + +test = 1 -- cgit v1.2.3