summary refs log tree commit diff
path: root/lib/tests
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-04-25 15:04:30 +0200
committerProfpatsch <mail@profpatsch.de>2018-04-25 15:31:17 +0200
commitc84dad316a8d1eb0b5c2af0bd037c169096683ca (patch)
tree302d314a6959f91d3c766bf7f4a18e2d600f0b85 /lib/tests
parent4340a1582ffbd90f19e42f1480d36e17c0b515c7 (diff)
downloadnixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.tar
nixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.tar.gz
nixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.tar.bz2
nixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.tar.lz
nixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.tar.xz
nixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.tar.zst
nixlib-c84dad316a8d1eb0b5c2af0bd037c169096683ca.zip
lib/generators: print paths without quotes & move function down
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/misc.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index 5f19dd63f2d8..c683df7d7ca3 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -317,7 +317,8 @@ runTests {
     expr = mapAttrs (const (generators.toPretty {})) rec {
       int = 42;
       bool = true;
-      string = "fnord";
+      string = ''fno"rd'';
+      path = /. + "/foo"; # toPath returns a string
       null_ = null;
       function = x: x;
       functionArgs = { arg ? 4, foo }: arg;
@@ -328,13 +329,14 @@ runTests {
     expected = rec {
       int = "42";
       bool = "true";
-      string = "\"fnord\"";
+      string = ''"fno\"rd"'';
+      path = "/foo";
       null_ = "null";
       function = "<λ>";
       functionArgs = "<λ:{(arg),foo}>";
       list = "[ 3 4 ${function} [ false ] ]";
       attrs = "{ \"foo\" = null; \"foo bar\" = \"baz\"; }";
-      drv = "<δ>";
+      drv = "<δ:test>";
     };
   };