diff options
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r-- | lib/tests/misc.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 31c938a8ffda1..b73da4f1010d4 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -478,6 +478,23 @@ runTests { # ATTRSETS + testConcatMapAttrs = { + expr = concatMapAttrs + (name: value: { + ${name} = value; + ${name + value} = value; + }) + { + foo = "bar"; + foobar = "baz"; + }; + expected = { + foo = "bar"; + foobar = "baz"; + foobarbaz = "baz"; + }; + }; + # code from the example testRecursiveUpdateUntil = { expr = recursiveUpdateUntil (path: l: r: path == ["foo"]) { |