about summary refs log tree commit diff
path: root/nixpkgs/pkgs/pkgs-lib/tests/formats.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/pkgs-lib/tests/formats.nix')
-rw-r--r--nixpkgs/pkgs/pkgs-lib/tests/formats.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/pkgs-lib/tests/formats.nix b/nixpkgs/pkgs/pkgs-lib/tests/formats.nix
index 16b760a5ada1..2c117e29e9ba 100644
--- a/nixpkgs/pkgs/pkgs-lib/tests/formats.nix
+++ b/nixpkgs/pkgs/pkgs-lib/tests/formats.nix
@@ -124,6 +124,22 @@ in runBuildTests {
     '';
   };
 
+  testIniListToValue = {
+    drv = evalFormat formats.ini { listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault {}); } {
+      foo = {
+        bar = [ null true "test" 1.2 10 ];
+        baz = false;
+        qux = "qux";
+      };
+    };
+    expected = ''
+      [foo]
+      bar=null, true, test, 1.200000, 10
+      baz=false
+      qux=qux
+    '';
+  };
+
   testTomlAtoms = {
     drv = evalFormat formats.toml {} {
       false = false;