summary refs log tree commit diff
path: root/lib/tests/misc.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r--lib/tests/misc.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index 01ff5ecf148..739c5d5fe15 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -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" = {