26 lines
590 B
Bash
26 lines
590 B
Bash
# Makes tests
|
|
|
|
# Variables
|
|
FILTER=dist/linp.lua
|
|
|
|
# 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
|
|
|
|
# Makes distribution bundle
|
|
sh scripts/make_dist.sh
|
|
|
|
# Does tests
|
|
clear && echo "🐾 Starting tests"
|
|
for arg in "$@"; do
|
|
echo && echo "⚗️ Test in '$arg' format:"
|
|
mds=$'\n\n'`(pandoc -t markdown tests/*.md)`
|
|
rst=$'\n\n'`(pandoc -t markdown tests/*.rst)`
|
|
org=$'\n\n'`(pandoc -t markdown tests/*.org)`
|
|
echo "$mds" "$rst" "$org" | pandoc -L $FILTER -t $arg
|
|
done
|