Skip to content

Commit 80a02c0

Browse files
committed
Fix tests.sh so it copies over output files even if the file doesn't exist yet.
1 parent fc4b29c commit 80a02c0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ my_diff() {
3838
# output
3939
# - Fix the CRLF line endings in the files on disk, because git adds them to
4040
# text files.
41+
if [ "${UPDATE_OUT}" == "1" ]; then
42+
# echo "Copying $file_b to $file_a... in $(pwd)"
43+
cp $file_b $file_a
44+
fi
4145
if [ ! -f $1 ]; then
4246
echo "File $1 is missing?!"
4347
return 1
@@ -47,9 +51,6 @@ my_diff() {
4751
else
4852
diff <(cat $file_a | tr -d '\r') <(cat $file_b | sed 's~\\\\~/~g')
4953
result=$?
50-
if [ "${UPDATE_OUT}" == "1" ]; then
51-
cp $file_b $file_a
52-
fi
5354
return $result
5455
fi
5556
}

0 commit comments

Comments
 (0)