tests/functional2/lang: Migrate function args tests

Change-Id: Ia805d7fbf74c671fc419fb8c9db3960b6be62354
This commit is contained in:
piegames
2025-09-18 23:38:46 +02:00
parent f2b64142a9
commit 21a0b81a26
19 changed files with 12 additions and 27 deletions
@@ -1,15 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<expr>
<list>
<string value="stdenv" />
<string value="fetchurl" />
<string value="aterm-stdenv" />
<string value="aterm-stdenv2" />
<string value="libX11" />
<string value="libXv" />
<string value="mplayer-stdenv2.libXv-libX11" />
<string value="mplayer-stdenv2.libXv-libX11_2" />
<string value="nix-stdenv-aterm-stdenv" />
<string value="nix-stdenv2-aterm2-stdenv2" />
</list>
</expr>
@@ -1,12 +1,12 @@
error:
… from call site
at /pwd/eval-fail-missing-and-unexpected-args.nix:1:1:
at /pwd/in.nix:1:1:
1| ({a, b, c}: a + b + c) {c = 1; d = 1; e = 1; f = 1;}
| ^
2|
error: function 'anonymous lambda' called without required arguments 'a' and 'b' and with unexpected arguments 'd', 'e' and 'f'
at /pwd/eval-fail-missing-and-unexpected-args.nix:1:2:
at /pwd/in.nix:1:2:
1| ({a, b, c}: a + b + c) {c = 1; d = 1; e = 1; f = 1;}
| ^
2|
@@ -1,12 +1,12 @@
error:
… from call site
at /pwd/eval-fail-missing-arg.nix:1:1:
at /pwd/in.nix:1:1:
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
| ^
2|
error: function 'anonymous lambda' called without required argument 'y'
at /pwd/eval-fail-missing-arg.nix:1:2:
at /pwd/in.nix:1:2:
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
| ^
2|
@@ -1,12 +1,12 @@
error:
… from call site
at /pwd/eval-fail-missing-args.nix:1:1:
at /pwd/in.nix:1:1:
1| ({a, b, c, d}: a + b + c + d) { }
| ^
2|
error: function 'anonymous lambda' called without required arguments 'a', 'b', 'c' and 'd'
at /pwd/eval-fail-missing-args.nix:1:2:
at /pwd/in.nix:1:2:
1| ({a, b, c, d}: a + b + c + d) { }
| ^
2|
@@ -1,12 +1,12 @@
error:
… from call site
at /pwd/eval-fail-undeclared-arg.nix:1:1:
at /pwd/in.nix:1:1:
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
| ^
2|
error: function 'anonymous lambda' called with unexpected argument 'y'
at /pwd/eval-fail-undeclared-arg.nix:1:2:
at /pwd/in.nix:1:2:
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
| ^
2|
@@ -1,12 +1,12 @@
error:
… from call site
at /pwd/eval-fail-undeclared-args.nix:1:1:
at /pwd/in.nix:1:1:
1| ({a ? "foo", b ? "bar"}: a + b) {c = "meow"; d = "meow";}
| ^
2|
error: function 'anonymous lambda' called with unexpected arguments 'c' and 'd'
at /pwd/eval-fail-undeclared-args.nix:1:2:
at /pwd/in.nix:1:2:
1| ({a ? "foo", b ? "bar"}: a + b) {c = "meow"; d = "meow";}
| ^
2|
@@ -1,5 +1,5 @@
error: duplicate formal function argument 'args'
at /pwd/parse-fail-patterns-1.nix:1:1:
at /pwd/in.nix:1:1:
1| args@{args, x, y, z}: x
| ^
2|
@@ -1,4 +1,4 @@
error: duplicate formal function argument 'x'
at /pwd/parse-fail-dup-formals.nix:1:8:
at /pwd/in.nix:1:8:
1| {x, y, x}: x
| ^