[sword-cvs] sword/tests/testsuite runall.sh,NONE,1.1 runtest.sh,NONE,1.1 verseparsing.good,NONE,1.1 verseparsing.sh,NONE,1.1

sword@www.crosswire.org sword@www.crosswire.org
Tue, 10 Jun 2003 11:44:56 -0700


Update of /usr/local/cvsroot/sword/tests/testsuite
In directory www:/tmp/cvs-serv30215/tests/testsuite

Added Files:
	runall.sh runtest.sh verseparsing.good verseparsing.sh 
Log Message:
	Added tests/testsuite for building a good set
		of regression tests
	Fixed VerseKey parsing of "1. book" and osisRefs



--- NEW FILE: runall.sh ---
#!/bin/sh

TESTSUITE="verseparsing"

for i in $TESTSUITE; do
	./runtest.sh $i -q
	if [ $? -ne 0 ]; then
		echo $i: FAILED
		echo ""
		echo To see problems, try running:
		echo ./runtest.sh $i
		echo ""
		exit 1
	else
		echo $i: PASSED.
	fi
done
echo "ALL PASSED!"
exit 0
fi

--- NEW FILE: runtest.sh ---
#!/bin/sh

if [ "$1" = "" ]; then
	echo usage: $0 "<test_to_run (no .sh)>"
	exit 1
fi

./$1.sh > $1.try
BAD=`diff -u $1.try $1.good`
if [ "$BAD" = "" ]; then
	if [ "$2" = "-q" ]; then
		exit 0
	else
		echo PASSED!
	fi
	exit 0
else
	if [ "$2" = "-q" ]; then
		exit 1
	else
		echo "Script failed at: (- bad output; + should have been)"
		diff -u $1.try $1.good
	fi
	exit 1
fi

--- NEW FILE: verseparsing.good ---
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3
I John 2:3

--- NEW FILE: verseparsing.sh ---
#!/bin/sh
../parsekey "1jn.2.3"
../parsekey "1 jn.2.3"
../parsekey "Ijn.2.3"
../parsekey "I jn.2.3"
../parsekey "1jn 2.3"
../parsekey "1 jn 2.3"
../parsekey "Ijn 2.3"
../parsekey "I jn 2.3"
../parsekey "1jn.2:3"
../parsekey "1 jn.2:3"
../parsekey "Ijn.2:3"
../parsekey "I jn.2:3"
../parsekey "1jn 2:3"
../parsekey "1 jn 2:3"
../parsekey "Ijn 2:3"
../parsekey "I jn 2:3"

../parsekey "1.jn.2.3"
../parsekey "1. jn.2.3"
../parsekey "I.jn.2.3"
../parsekey "I. jn.2.3"
../parsekey "1.jn 2.3"
../parsekey "1. jn 2.3"
../parsekey "I.jn 2.3"
../parsekey "I. jn 2.3"
../parsekey "1.jn.2:3"
../parsekey "1. jn.2:3"
../parsekey "I.jn.2:3"
../parsekey "I. jn.2:3"
../parsekey "1.jn 2:3"
../parsekey "1. jn 2:3"
../parsekey "I.jn 2:3"
../parsekey "I. jn 2:3"