mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Merge pull request #7436 from edolstra/enable-lang-tests
Enable some language tests that were accidentally disabled
This commit is contained in:
commit
e408af82ab
6 changed files with 14 additions and 6 deletions
|
@ -812,10 +812,13 @@ static void opServe(Strings opFlags, Strings opArgs)
|
||||||
if (nrRepeats != 0) {
|
if (nrRepeats != 0) {
|
||||||
throw Error("client requested repeating builds, but this is not currently implemented");
|
throw Error("client requested repeating builds, but this is not currently implemented");
|
||||||
}
|
}
|
||||||
// Ignore. It used to be true by default, but also only never had any effect when `nrRepeats == 0`.
|
// Ignore 'enforceDeterminism'. It used to be true by
|
||||||
// We have already asserted that `nrRepeats` in fact is 0, so we can safely ignore this without
|
// default, but also only never had any effect when
|
||||||
// doing something other than what the client asked for.
|
// `nrRepeats == 0`. We have already asserted that
|
||||||
auto _enforceDeterminism = readInt(in);
|
// `nrRepeats` in fact is 0, so we can safely ignore this
|
||||||
|
// without doing something other than what the client
|
||||||
|
// asked for.
|
||||||
|
readInt(in);
|
||||||
|
|
||||||
settings.runDiffHook = true;
|
settings.runDiffHook = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ source common.sh
|
||||||
|
|
||||||
export TEST_VAR=foo # for eval-okay-getenv.nix
|
export TEST_VAR=foo # for eval-okay-getenv.nix
|
||||||
export NIX_REMOTE=dummy://
|
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.trace "Hello" 123' 2>&1 | grep -q Hello
|
||||||
nix-instantiate --eval -E 'builtins.addErrorContext "Hello" 123' 2>&1
|
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
|
if test -e lang/$i.flags; then
|
||||||
flags=$(cat lang/$i.flags)
|
flags=$(cat lang/$i.flags)
|
||||||
fi
|
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"
|
echo "FAIL: $i should evaluate"
|
||||||
fail=1
|
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"
|
echo "FAIL: evaluation result of $i not as expected"
|
||||||
fail=1
|
fail=1
|
||||||
fi
|
fi
|
||||||
|
|
1
tests/lang/eval-okay-closure.exp
Normal file
1
tests/lang/eval-okay-closure.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[ { foo = true; key = -13; } { foo = true; key = -12; } { foo = true; key = -11; } { foo = true; key = -9; } { foo = true; key = -8; } { foo = true; key = -7; } { foo = true; key = -5; } { foo = true; key = -4; } { foo = true; key = -3; } { key = -1; } { foo = true; key = 0; } { foo = true; key = 1; } { foo = true; key = 2; } { foo = true; key = 4; } { foo = true; key = 5; } { foo = true; key = 6; } { key = 8; } { foo = true; key = 9; } { foo = true; key = 10; } { foo = true; key = 13; } { foo = true; key = 14; } { foo = true; key = 15; } { key = 17; } { foo = true; key = 18; } { foo = true; key = 19; } { foo = true; key = 22; } { foo = true; key = 23; } { key = 26; } { foo = true; key = 27; } { foo = true; key = 28; } { foo = true; key = 31; } { foo = true; key = 32; } { key = 35; } { foo = true; key = 36; } { foo = true; key = 40; } { foo = true; key = 41; } { key = 44; } { foo = true; key = 45; } { foo = true; key = 49; } { key = 53; } { foo = true; key = 54; } { foo = true; key = 58; } { key = 62; } { foo = true; key = 67; } { key = 71; } { key = 80; } ]
|
1
tests/lang/eval-okay-functionargs.exp
Normal file
1
tests/lang/eval-okay-functionargs.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[ "stdenv" "fetchurl" "aterm-stdenv" "aterm-stdenv2" "libX11" "libXv" "mplayer-stdenv2.libXv-libX11" "mplayer-stdenv2.libXv-libX11_2" "nix-stdenv-aterm-stdenv" "nix-stdenv2-aterm2-stdenv2" ]
|
1
tests/lang/eval-okay-path-antiquotation.exp
Normal file
1
tests/lang/eval-okay-path-antiquotation.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ 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; }
|
1
tests/lang/eval-okay-path.exp
Normal file
1
tests/lang/eval-okay-path.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
"/nix/store/ya937r4ydw0l6kayq8jkyqaips9c75jm-output"
|
Loading…
Reference in a new issue