aboutsummaryrefslogtreecommitdiff
path: root/tests/lang.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang.sh')
-rw-r--r--tests/lang.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lang.sh b/tests/lang.sh
index c0b0fc58c..95e795e2e 100644
--- a/tests/lang.sh
+++ b/tests/lang.sh
@@ -2,6 +2,7 @@ source common.sh
export TEST_VAR=foo # for eval-okay-getenv.nix
export NIX_REMOTE=dummy://
+export NIX_STORE_DIR=/nix/store
nix-instantiate --eval -E 'builtins.trace "Hello" 123' 2>&1 | grep -q Hello
nix-instantiate --eval -E 'builtins.addErrorContext "Hello" 123' 2>&1
@@ -50,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