Skip to content

Commit 7a1b4f4

Browse files
committed
Better test cleanup
1 parent 5a6e9b0 commit 7a1b4f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ function doTest() {
3131
diff -u ${REFERENCE} ${OUTPUT}
3232
rc=$?
3333
if [ $rc = 0 ]; then
34-
rm -f ${TESTDIR}/.${name}.*
34+
rm -f ${OUTPUT}
3535
echo "PASS" >&2
3636
elif [ -z $GITHUB_ACTIONS ]; then
3737
read -p "Are these changes expected? [y/N] " EXPECTED
3838
case $EXPECTED in
3939
y*|Y*)
4040
echo "Updating ${REFERENCE}"
4141
cp ${OUTPUT} ${REFERENCE}
42+
rm -f ${OUTPUT}
4243
rc=0
4344
;;
4445
*) ;;
@@ -81,14 +82,15 @@ function doTestCompare() {
8182
rc=$?
8283

8384
if [ $rc = 0 ]; then
84-
rm -f ${TESTDIR}/.${name}.*
85+
rm -f ${OUTPUT}
8586
echo "PASS" >&2
8687
elif [ -z $GITHUB_ACTIONS ]; then
8788
read -p "Are these changes expected? [y/N] " EXPECTED
8889
case $EXPECTED in
8990
y*|Y*)
9091
echo "Updating ${REFERENCE}"
9192
cp ${OUTPUT} ${REFERENCE}
93+
rm -f ${OUTPUT}
9294
rc=0
9395
;;
9496
*) ;;

0 commit comments

Comments
 (0)