lib/generators: Add toINI option for duplicate keys

This commit is contained in:
Silvan Mosberger
2020-03-10 02:38:28 +01:00
parent 169fc2eeca
commit 575354babf
2 changed files with 24 additions and 6 deletions

View File

@@ -348,6 +348,18 @@ runTests {
'';
};
testToINIDuplicateKeys = {
expr = generators.toINI { listsAsDuplicateKeys = true; } { foo.bar = true; baz.qux = [ 1 false ]; };
expected = ''
[baz]
qux=1
qux=false
[foo]
bar=true
'';
};
testToINIDefaultEscapes = {
expr = generators.toINI {} {
"no [ and ] allowed unescaped" = {