Add parameter to test script to specify font dir

This way we can run tests when installing in a staging dir.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
Claudio Matsuoka 2011-01-25 22:57:11 -02:00
parent adcddcd38e
commit e91b35b234

View File

@ -5,6 +5,11 @@ OUTPUT=`mktemp`
LOGFILE=tests.log
CMD=./figlet
if [ -n "$1" ]; then
FONTDIR="-d $1"
CMD="$CMD $FONTDIR"
fi
run_test() {
test_num=$1
test_dsc=$2
@ -37,7 +42,7 @@ echo -n "Default font dir: "; $CMD -I2
echo -n "Default font: "; $CMD -I3
echo
run_test 001 "showfigfonts output" "./showfigfonts"
run_test 001 "showfigfonts output" "./showfigfonts $FONTDIR"
run_test 002 "text rendering in all fonts" \
"for i in fonts/*.flf; do $cmd -f \$i; done"
run_test 003 "long text rendering" "cat tests/longtext.txt|./figlet"