test1.sh 1.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#!/bin/sh

EG_DATA=/u/www/projects/shapelib/eg_data

testdir="$(dirname "$(readlink -f $0)")"

(
cd "$top_builddir"
echo -------------------------------------------------------------------------
echo Test 1: dump anno.shp
echo -------------------------------------------------------------------------
./shpdump $EG_DATA/anno.shp | head -250

echo -------------------------------------------------------------------------
echo Test 2: dump brklinz.shp
echo -------------------------------------------------------------------------
./shpdump $EG_DATA/brklinz.shp | head -500

echo -------------------------------------------------------------------------
echo Test 3: dump polygon.shp
echo -------------------------------------------------------------------------
./shpdump $EG_DATA/polygon.shp | head -500

echo -------------------------------------------------------------------------
echo Test 4: dump pline.dbf - uses new F field type
echo -------------------------------------------------------------------------
./dbfdump -m -h $EG_DATA/pline.dbf | head -50

echo -------------------------------------------------------------------------
echo Test 5: NULL Shapes.
echo -------------------------------------------------------------------------
./shpdump $EG_DATA/csah.dbf | head -150
) > "$testdir/s1.out"

result="$(diff "$testdir/s1.out" "$testdir/stream1.out")"
if [ "$result" == "" ]; then
	echo "******* Stream 1 Succeeded *********"
	rm "$testdir/s1.out"
	exit 0
else
	echo "******* Stream 1 Failed *********"
	echo "$result"
	rm "$testdir/s1.out"
	exit 1
fi