22 lines
440 B
Bash
22 lines
440 B
Bash
# Variables
|
|
DIR=`dirname -- "$0"`
|
|
|
|
# Moves to tests directory and clears the terminal
|
|
cd $DIR
|
|
clear
|
|
|
|
# Checks args
|
|
if [ -z "$*" ]; then
|
|
echo "ERROR: At least one argument is needed. For example:"
|
|
echo " sh $0 native"
|
|
echo " sh $0 native markdown"
|
|
exit 1
|
|
fi
|
|
|
|
# Does tests
|
|
echo "🐾 Starting tests"
|
|
for arg in "$@"; do
|
|
echo && echo "⚗️ Test in '$arg' format:"
|
|
pandoc --lua-filter ../src/literate.lua -t $arg src/*.md
|
|
done
|