diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-09-17 18:14:18 +0200 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-09-17 18:20:39 +0200 |
commit | 05e4d371ef5c3819b969d34eb76ed7e4b3c99027 (patch) | |
tree | bc93a039bb312d685153000223c9f060a08f665a /lib/tests | |
parent | d0be9e98109428e67e4b7fab3e49728cc6633073 (diff) |
lib/generators.toPretty: Print [] and {} compactly
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 2456b52c099c..f60e6ad17870 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 = "<function>"; functionArgs = "<function, args: {arg?, foo}>"; list = "[ 3 4 ${function} [ false ] ]"; + emptylist = "[ ]"; attrs = "{ foo = null; \"foo bar\" = \"baz\"; }"; + emptyattrs = "{ }"; drv = "<derivation ${deriv.drvPath}>"; }; }; |