blob: 3fb0dd9550ee4159f6d8ecdf863c1c3f38320e39 (
plain)
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
46
47
48
49
50
|
:
# Test cct
TEST_CLI_DIR=`dirname $0`
EXE=$1
usage()
{
echo "Usage: ${0} <path to 'cct' program>"
echo
exit 1
}
if test -z "${EXE}"; then
EXE=../../src/cct
fi
if test ! -x ${EXE}; then
echo "*** ERROR: Can not find '${EXE}' program!"
exit 1
fi
echo "============================================"
echo "Running ${0} using ${EXE}:"
echo "============================================"
OUT=testcct_out
rm -f ${OUT}
echo "Testing cct -d 8 +proj=merc +R=1" >> ${OUT}
echo "90 45" 0 | $EXE -d 8 +proj=merc +R=1 >>${OUT}
echo "" >>${OUT}
# do 'diff' with distribution results
echo "diff ${OUT} with testcct_out.dist"
diff -u ${OUT} ${TEST_CLI_DIR}/testcct_out.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
else
echo "TEST OK"
echo "test file ${OUT} removed"
echo
/bin/rm -f ${OUT}
exit 0
fi
|