test3.sh 885 Bytes
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
#!/bin/bash

#
#	Use example programs to create a very simple dataset that
#	should display in ARCView II.
#

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

(
cd "$top_builddir"
./shpcreate test polygon
./dbfcreate test.dbf -s Description 30 -n TestInt 6 0 -n TestDouble 16 5

./shpadd test 0 0 100 0 100 100 0 100 0 0 + 20 20 20 30 30 30 20 20
./dbfadd test.dbf "Square with triangle missing" 1.4 2.5

./shpadd test 150 150 160 150 180 170 150 150
./dbfadd test.dbf "Smaller triangle" 100 1000.25

./shpadd test 150 150 160 150 180 170 150 150
./dbfadd test.dbf "" "" ""

./shpdump test.shp
./dbfdump test.dbf
) > "$testdir/s3.out"

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