aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-05-29 19:39:02 +0200
committerFederico Angelilli <code@fedang.net>2024-05-29 19:39:02 +0200
commit6042502bc54807df1941bf4d540337cd8b9e5a58 (patch)
tree75be00446dd6c0908c9c2af0e35be0c348134c63 /test
parent61b820af1102d74f35a2af0b39d9d78971c45f96 (diff)
Fix section parsing and line tracking
Diffstat (limited to 'test')
-rw-r--r--test/ini.c6
-rw-r--r--test/test.ini9
2 files changed, 14 insertions, 1 deletions
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