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-autoargs.exp1
-rw-r--r--tests/lang/eval-okay-autoargs.flags1
-rw-r--r--tests/lang/eval-okay-autoargs.nix15
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-autoargs.exp b/tests/lang/eval-okay-autoargs.exp
new file mode 100644
index 000000000000..3b12bdd5e596
--- /dev/null
+++ b/tests/lang/eval-okay-autoargs.exp
@@ -0,0 +1 @@
+Str("xyzzy!xyzzy!foobar",[])
diff --git a/tests/lang/eval-okay-autoargs.flags b/tests/lang/eval-okay-autoargs.flags
new file mode 100644
index 000000000000..ae3762254460
--- /dev/null
+++ b/tests/lang/eval-okay-autoargs.flags
@@ -0,0 +1 @@
+--arg lib import(lang/lib.nix) --argstr xyzzy xyzzy! -A result
diff --git a/tests/lang/eval-okay-autoargs.nix b/tests/lang/eval-okay-autoargs.nix
new file mode 100644
index 000000000000..1356bb5aa21f
--- /dev/null
+++ b/tests/lang/eval-okay-autoargs.nix
@@ -0,0 +1,15 @@
+let
+
+  foobar = "foobar";
+
+in
+
+{ xyzzy2 ? xyzzy # mutually recursive args
+, xyzzy ? "blaat" # will be overriden by --argstr
+, fb ? foobar
+, lib # will be set by --arg
+}:
+
+{
+  result = lib.concat [xyzzy xyzzy2 fb];
+}