diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-repeated-list-to-attrs.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-repeated-list-to-attrs.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-repeated-list-to-attrs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-repeated-list-to-attrs.nix index 2f719dcef5be..ed819d76c718 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-repeated-list-to-attrs.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-repeated-list-to-attrs.nix @@ -3,11 +3,12 @@ let inherit (builtins) foldl' listToAttrs; - input = [ { name = "result"; value = 1; } { name = "result"; value = 2; } ]; + input = [{ name = "result"; value = 1; } { name = "result"; value = 2; }]; # foldl-based version of listToAttrs with the _opposite_ behaviour. - listToAttrs' = list: foldl' ( acc: elem: acc // { ${elem.name} = elem.value; }) {} list; -in [ + listToAttrs' = list: foldl' (acc: elem: acc // { ${elem.name} = elem.value; }) { } list; +in +[ (listToAttrs input).result (listToAttrs' input).result ] |