nix-super/tests/functional/lang/eval-okay-attrnames.nix

12 lines
261 B
Nix
Raw Normal View History

with import ./lib.nix;
let
attrs = {y = "y"; x = "x"; foo = "foo";} // rec {x = "newx"; bar = x;};
names = builtins.attrNames attrs;
values = map (name: builtins.getAttr name attrs) names;
2014-10-04 17:41:24 +03:00
in assert values == builtins.attrValues attrs; concat values