diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-12-12 16:55:42 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-12-12 16:55:42 +0100 |
commit | e86530ee46cc3ccb7ea137889f0d04cf9061664f (patch) | |
tree | c8841722bfc375f993631fad7402edd0e8df9dca | |
parent | 17f81d32152178730e8577caa60279bb86bb9372 (diff) |
Fix reference to test directory path
-rw-r--r-- | tests/lang.sh | 4 | ||||
-rw-r--r-- | tests/lang/eval-okay-path-antiquotation.exp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/lang.sh b/tests/lang.sh index 463f72826..95e795e2e 100644 --- a/tests/lang.sh +++ b/tests/lang.sh @@ -51,10 +51,10 @@ for i in lang/eval-okay-*.nix; do if test -e lang/$i.flags; then flags=$(cat lang/$i.flags) fi - if ! expect 0 env NIX_PATH=lang/dir3:lang/dir4 nix-instantiate $flags --eval --strict lang/$i.nix > lang/$i.out; then + if ! expect 0 env NIX_PATH=lang/dir3:lang/dir4 HOME=/fake-home nix-instantiate $flags --eval --strict lang/$i.nix > lang/$i.out; then echo "FAIL: $i should evaluate" fail=1 - elif ! diff lang/$i.out lang/$i.exp; then + elif ! diff <(< lang/$i.out sed -e "s|$(pwd)|/pwd|g") lang/$i.exp; then echo "FAIL: evaluation result of $i not as expected" fail=1 fi diff --git a/tests/lang/eval-okay-path-antiquotation.exp b/tests/lang/eval-okay-path-antiquotation.exp index b0e528f2a..5b8ea0243 100644 --- a/tests/lang/eval-okay-path-antiquotation.exp +++ b/tests/lang/eval-okay-path-antiquotation.exp @@ -1 +1 @@ -{ absolute = /foo; expr = /home/eelco/Dev/nix/tests/lang/foo/bar; home = /tmp/nix-shell.ZeLfDw/nix-test/default/test-home/foo; notfirst = /home/eelco/Dev/nix/tests/lang/bar/foo; simple = /home/eelco/Dev/nix/tests/lang/foo; slashes = /foo/bar; surrounded = /home/eelco/Dev/nix/tests/lang/a-foo-b; } +{ absolute = /foo; expr = /pwd/lang/foo/bar; home = /fake-home/foo; notfirst = /pwd/lang/bar/foo; simple = /pwd/lang/foo; slashes = /foo/bar; surrounded = /pwd/lang/a-foo-b; } |