about summary refs log tree commit diff
path: root/lib/tests/misc.nix
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-05-07 13:37:03 +0200
committerNaïm Favier <n@monade.li>2022-05-07 17:01:51 +0200
commit4d2ea62d8211be13575d62c6d1aa3858bf5c90e1 (patch)
tree85bc7a57c10298c4a8a63dcbcad5a0801d4290c4 /lib/tests/misc.nix
parent7dbfd6b9970c0bd939072f2f4e972e72fc70302a (diff)
lib/strings/toShellVars: handle derivations as strings
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 faa7ee547f57a..c7010f41394a0 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -269,6 +269,15 @@ runTests {
           strings
           possibly newlines
         '';
+        drv = {
+          outPath = "/drv";
+          foo = "ignored attribute";
+        };
+        path = /path;
+        stringable = {
+          __toString = _: "hello toString";
+          bar = "ignored attribute";
+        };
       }}
     '';
     expected = ''
@@ -277,6 +286,9 @@ runTests {
       declare -A assoc=(['with some']='strings
       possibly newlines
       ')
+      drv='/drv'
+      path='/path'
+      stringable='hello toString'
     '';
   };