tests/functional2/lang: Migrate merge-attrs tests
Change-Id: Ib8b8e4505454c5061d596dd490db43471bfb754b
This commit is contained in:
@@ -56,29 +56,6 @@ for i in parse-fail-*.nix; do
|
||||
fi
|
||||
done
|
||||
|
||||
for i in parse-okay-*.nix; do
|
||||
echo "parsing $i (should succeed)";
|
||||
i=$(basename "$i" .nix)
|
||||
|
||||
declare -a flags=()
|
||||
if test -e "$i.flags"; then
|
||||
read -r -a flags < "$i.flags"
|
||||
fi
|
||||
if
|
||||
expect 0 nix-instantiate --parse "${flags[@]}" "$i.nix" \
|
||||
1> "$i.out" \
|
||||
2> "$i.err"
|
||||
then
|
||||
sed -i "s!$(pwd)!/pwd!g" "$i.out" "$i.err"
|
||||
yq --in-place --yaml-output '.' "$i.out"
|
||||
diffAndAccept "$i" out exp
|
||||
diffAndAccept "$i" err err.exp
|
||||
else
|
||||
echo "FAIL: $i should parse"
|
||||
badExitCode=1
|
||||
fi
|
||||
done
|
||||
|
||||
for i in eval-fail-*.nix; do
|
||||
echo "evaluating $i (should fail)";
|
||||
i=$(basename "$i" .nix)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
error: attribute 'z' already defined at /pwd/parse-fail-mixed-nested-attrs1.nix:3:16
|
||||
at /pwd/parse-fail-mixed-nested-attrs1.nix:2:3:
|
||||
1| {
|
||||
2| x.z = 3;
|
||||
| ^
|
||||
3| x = { y = 3; z = 3; };
|
||||
@@ -1,6 +0,0 @@
|
||||
error: attribute 'y' already defined at /pwd/parse-fail-mixed-nested-attrs2.nix:3:9
|
||||
at /pwd/parse-fail-mixed-nested-attrs2.nix:2:3:
|
||||
1| {
|
||||
2| x.y.y = 3;
|
||||
| ^
|
||||
3| x = { y.y= 3; z = 3; };
|
||||
@@ -0,0 +1,6 @@
|
||||
error: attribute 'z' already defined at /pwd/in.nix:3:16
|
||||
at /pwd/in.nix:2:3:
|
||||
1| {
|
||||
2| x.z = 3;
|
||||
| ^
|
||||
3| x = { y = 3; z = 3; };
|
||||
@@ -0,0 +1,6 @@
|
||||
error: attribute 'y' already defined at /pwd/in.nix:3:9
|
||||
at /pwd/in.nix:2:3:
|
||||
1| {
|
||||
2| x.y.y = 3;
|
||||
| ^
|
||||
3| x = { y.y= 3; z = 3; };
|
||||
Reference in New Issue
Block a user