about summary refs log tree commit diff
path: root/tests/lang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-attrnames.exp1
-rw-r--r--tests/lang/eval-okay-attrnames.nix11
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-attrnames.exp b/tests/lang/eval-okay-attrnames.exp
new file mode 100644
index 000000000000..98af99a0cab0
--- /dev/null
+++ b/tests/lang/eval-okay-attrnames.exp
@@ -0,0 +1 @@
+Str("newxfoonewxy",[])
diff --git a/tests/lang/eval-okay-attrnames.nix b/tests/lang/eval-okay-attrnames.nix
new file mode 100644
index 000000000000..978138f0c0d9
--- /dev/null
+++ b/tests/lang/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 concat values