tests/functional2/lang: Migrate undefined-var tests

The second test has also been fixed. I'd do it in two commits if
functional1 wasn't such a PITA (guess why we're doing the migration …).

Basically, the introduced syntax got changed later on, but the test
never got updated, and back then tests didn't test the output so nobody
ever noticed it now failing for a wrong reason.

Change-Id: I5b66127d507c65676b8dd4a82d1e1f2857fef145
This commit is contained in:
piegames
2025-11-17 22:10:11 +00:00
parent 108beda9ae
commit 59dd03bc39
6 changed files with 13 additions and 13 deletions
@@ -1,6 +0,0 @@
error: syntax error, expecting '}'
at /pwd/parse-fail-undef-var-2.nix:3:13:
2|
3| f = {x, y : ["baz" "bar" z "bat"]}: x + y;
| ^
4|
@@ -1,6 +0,0 @@
let
f = {x, y : ["baz" "bar" z "bat"]}: x + y;
in
f {x = "foo"; y = "bar";}
@@ -0,0 +1,6 @@
let
f = {x, y ? ["baz" "bar" z "bat"]}: x + y;
in
f {x = "foo"; y = "bar";}
@@ -0,0 +1,6 @@
error: undefined variable 'z'
at /pwd/in.nix:3:28:
2|
3| f = {x, y ? ["baz" "bar" z "bat"]}: x + y;
| ^
4|
@@ -1,5 +1,5 @@
error: undefined variable 'y'
at /pwd/parse-fail-undef-var.nix:1:4:
at /pwd/in.nix:1:4:
1| x: y
| ^
2|