Merge pull request #9168 from obsidiansystems/fix-lang-tests-read-only

Fix language tests a bit

(cherry picked from commit e92cac789fc84b116a03db04a5f7de8df48e34cd)
Change-Id: I527e94c5af0921ff2559ce5a4ac7635be791c22e
This commit is contained in:
eldritch horrors 2024-03-04 04:42:21 +01:00
parent c0fa61340c
commit 5ddd1a9166
9 changed files with 14 additions and 27 deletions

View file

@ -68,7 +68,7 @@ for i in lang/eval-fail-*.nix; do
echo "evaluating $i (should fail)"; echo "evaluating $i (should fail)";
i=$(basename "$i" .nix) i=$(basename "$i" .nix)
if if
expectStderr 1 nix-instantiate --show-trace "lang/$i.nix" \ expectStderr 1 nix-instantiate --eval --strict --show-trace "lang/$i.nix" \
| sed "s!$(pwd)!/pwd!g" > "lang/$i.err" | sed "s!$(pwd)!/pwd!g" > "lang/$i.err"
then then
diffAndAccept "$i" err err.exp diffAndAccept "$i" err err.exp

View file

@ -1 +0,0 @@
error: getting attributes of path PWD/lang/fnord: No such file or directory

View file

@ -1,10 +0,0 @@
error:
… while evaluating a path segment
at /pwd/lang/eval-fail-bad-antiquote-1.nix:1:2:
1| "${x: x}"
| ^
2|
error: cannot coerce a function to a string

View file

@ -1 +0,0 @@
error: operation 'addToStoreFromDump' is not supported by store 'dummy'

View file

@ -1,10 +0,0 @@
error:
… while evaluating a path segment
at /pwd/lang/eval-fail-bad-antiquote-3.nix:1:3:
1| ''${x: x}''
| ^
2|
error: cannot coerce a function to a string

View file

@ -1 +1 @@
error: operation 'addToStoreFromDump' is not supported by store 'dummy' error: getting status of '/pwd/lang/fnord': No such file or directory

View file

@ -1,4 +1,14 @@
error: dynamic attribute 'b' already defined at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:11 error:
… while evaluating the attribute 'set'
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:3:
1| {
2| set = { "${"" + "b"}" = 1; };
| ^
3| set = { "${"b" + ""}" = 2; };
error: dynamic attribute 'b' already defined at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:11
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:3:11: at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:3:11:

View file

@ -1 +1 @@
error: operation 'addToStoreFromDump' is not supported by store 'dummy' error: getting status of '/pwd/lang/fnord': No such file or directory

View file

@ -1 +0,0 @@
error: attribute services.ssh at (string):3:3 already defined at (string):2:3