chore: fmt most of the acceptance tests

This commit is contained in:
rvcas
2023-02-09 00:57:14 -05:00
parent 3f540c7c99
commit 6f591c633d
13 changed files with 61 additions and 39 deletions

26
examples/acceptance_tests/fmt Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
if [ -z $1 ]; then
echo -e "\033[31mMissing argument: \033[1mACCEPTANCE_TEST\033[0m"
echo ""
echo -e "\033[1mUsage: \033[0m"
echo " run.sh {ACCEPTANCE_TEST}"
echo ""
echo -e "\033[1mExample: \033[0m"
echo " run.sh 034"
exit 1
fi
WORKDIR="$(dirname -- "${BASH_SOURCE[0]}")"
TARGET="$WORKDIR/$(basename $1)"
TMP=$(mktemp)
RESULT=$(cargo run --quiet -- fmt $TARGET 2>$TMP)
if [ "$?" -eq "0" ]; then
echo "✅ $(basename $TARGET)"
else
echo "❌ $(basename $TARGET)"
cat $TMP
exit 1
fi