Skip to content

Commit df45ba6

Browse files
committed
stop using deprecated anonymous stdin behavior on test script
1 parent 6bcc87c commit df45ba6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ verifyCorrect() {
3535
shift
3636

3737
echo "Checking $file (${*:-no options}) …"
38-
if ! out=$(nixfmt --strict --verify "$@" < "$file"); then
38+
if ! out=$(nixfmt --strict --verify "$@" - < "$file"); then
3939
echo "[ERROR] failed nixfmt verification"
4040
exit 1
4141
fi
@@ -60,7 +60,7 @@ verifyCorrect test/correct-indent-4.nix --indent=4
6060

6161
# Verify "invalid"
6262
for file in test/invalid/*.nix; do
63-
if nixfmt < "$file" > /dev/null 2>&1; then
63+
if nixfmt - < "$file" > /dev/null 2>&1; then
6464
echo "[ERROR] $file should have failed nixfmt"
6565
exit 1
6666
else
@@ -71,7 +71,7 @@ done
7171
# Verify "diff"
7272
for file in test/diff/**/in.nix; do
7373
echo "Checking $file"
74-
out="$(nixfmt --verify < "$file")"
74+
out="$(nixfmt --verify - < "$file")"
7575
outfile="$(dirname "$file")/out.nix"
7676

7777
if diff --color=always --unified "$outfile" <(echo "$out"); then
@@ -85,7 +85,7 @@ for file in test/diff/**/in.nix; do
8585
fi
8686

8787
echo "Checking $file with --strict …"
88-
out="$(nixfmt --strict --verify < "$file")"
88+
out="$(nixfmt --strict --verify - < "$file")"
8989
outfile="$(dirname "$file")/out-pure.nix"
9090

9191
if diff --color=always --unified "$outfile" <(echo "$out"); then

0 commit comments

Comments
 (0)