From 05e4d371ef5c3819b969d34eb76ed7e4b3c99027 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 17 Sep 2020 18:14:18 +0200 Subject: lib/generators.toPretty: Print [] and {} compactly --- lib/tests/misc.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/tests') diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 2456b52c099c0..f60e6ad17870a 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -461,7 +461,9 @@ runTests { function = x: x; functionArgs = { arg ? 4, foo }: arg; list = [ 3 4 function [ false ] ]; + emptylist = []; attrs = { foo = null; "foo bar" = "baz"; }; + emptyattrs = {}; drv = deriv; }; expected = rec { @@ -476,7 +478,9 @@ runTests { function = ""; functionArgs = ""; list = "[ 3 4 ${function} [ false ] ]"; + emptylist = "[ ]"; attrs = "{ foo = null; \"foo bar\" = \"baz\"; }"; + emptyattrs = "{ }"; drv = ""; }; }; -- cgit 1.4.1