]> git.proxmox.com Git - libgit2.git/commit - tests/config/write.c
config: write out section headers with subsections correctly
authorCarlos Martín Nieto <carlos@cmartin.tk>
Fri, 9 Mar 2012 19:38:32 +0000 (20:38 +0100)
committerCarlos Martín Nieto <carlos@cmartin.tk>
Fri, 9 Mar 2012 19:43:17 +0000 (20:43 +0100)
commit54fef6ebcba8777caf389cba06556aab6f22b1cc
tree9924808b98aa668158b5085a1995994285cf5405
parent6cfe3b3f12a059a044f94c63e495ab729cd9ec7b
config: write out section headers with subsections correctly

write_section() mistakenly treated is input as the whole variable name
instead of simply the section (and possibly subsection) and would
confuse "section.subsection" as a section plus variable name and
produce a wrong section header.

Fix this and include a test for writing "section.subsection.var" and
reading it from the file.
src/config_file.c
tests-clar/config/write.c