From 23b3177402dfc0ed8228bf9f5fecd1672d5f7ec3 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Sun, 21 Jun 2026 18:04:34 -0400 Subject: [PATCH] lib.attrsets.concatMapAttrs: add test for handling duplicates (cherry picked from commit f3e6fa555f71f2a4c87e51d457a1eeabcde459a8) --- lib/tests/misc.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index e2872dcafce9..eeba768a902f 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -2164,6 +2164,21 @@ runTests { }; }; + testConcatMapAttrsDuplicates = { + expr = + concatMapAttrs + (name: value: { + final = value; + }) + { + a = 1; + b = 2; + }; + expected = { + final = 2; + }; + }; + testFilterAttrs = { expr = filterAttrs (n: v: n != "a" && (v.hello or false) == true) { a.hello = true;