diff options
Diffstat (limited to 'tvix/eval/src/tests/nix_tests/eval-okay-attrnames.nix')
-rw-r--r-- | tvix/eval/src/tests/nix_tests/eval-okay-attrnames.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/nix_tests/eval-okay-attrnames.nix b/tvix/eval/src/tests/nix_tests/eval-okay-attrnames.nix new file mode 100644 index 000000000000..e5b26e9f2e39 --- /dev/null +++ b/tvix/eval/src/tests/nix_tests/eval-okay-attrnames.nix @@ -0,0 +1,11 @@ +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; + +in assert values == builtins.attrValues attrs; concat values |