tests/functional2/lang: Migrate eof tests
Call it a bug, call it a feature, but the old testing framework
ungracefully shits itself when it has no tests to run … in other words,
we finally migrated all the parse-fail tests 🎉
Change-Id: Ibd7f1c04d9a396a20f14361af7924f0074d1ac23
This commit is contained in:
@@ -38,24 +38,6 @@ set +x
|
||||
badDiff=0
|
||||
badExitCode=0
|
||||
|
||||
for i in parse-fail-*.nix; do
|
||||
echo "parsing $i (should fail)";
|
||||
i=$(basename "$i" .nix)
|
||||
|
||||
declare -a flags=()
|
||||
if test -e "$i.flags"; then
|
||||
read -r -a flags < "$i.flags"
|
||||
fi
|
||||
if expectStderr 1 nix-instantiate --parse "${flags[@]}" "$i.nix" > "$i.err"
|
||||
then
|
||||
sed -i "s!$(pwd)!/pwd!g" "$i.err"
|
||||
diffAndAccept "$i" err err.exp
|
||||
else
|
||||
echo "FAIL: $i shouldn't parse"
|
||||
badExitCode=1
|
||||
fi
|
||||
done
|
||||
|
||||
for i in eval-fail-*.nix; do
|
||||
echo "evaluating $i (should fail)";
|
||||
i=$(basename "$i" .nix)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
error: syntax error, unexpected end of file, expecting '"'
|
||||
at /pwd/parse-fail-eof-in-string.nix:3:6:
|
||||
at /pwd/in.nix:3:6:
|
||||
2| # Note that this file must not end with a newline.
|
||||
3| a 1"$
|
||||
| ^
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
error: syntax error, unexpected end of file, expecting expression
|
||||
at /pwd/parse-fail-eof-pos.nix:3:1:
|
||||
at /pwd/in.nix:3:1:
|
||||
2| # no content
|
||||
3|
|
||||
| ^
|
||||
Reference in New Issue
Block a user