source:
git/tests/diffpos.tst
@
849bfba
Last change on this file since 849bfba was d4d8efe, checked in by , 24 years ago | |
---|---|
|
|
File size: 729 bytes |
Rev | Line | |
---|---|---|
[fbc3a20] | 1 | #!/bin/sh |
[6b8ff5b] | 2 | |
[d4d8efe] | 3 | testdir=`echo $0 | sed 's!/[^/]*$!!' || echo '.'` |
4 | ||
[6b8ff5b] | 5 | # allow us to run tests standalone more easily |
[d4d8efe] | 6 | : ${srcdir="$testdir"} |
[647407d] | 7 | |
[5476de6] | 8 | # force VERBOSE if we're run on a subset of tests |
9 | test -n "$*" && VERBOSE=1 | |
10 | ||
[d4d8efe] | 11 | : ${DIFFPOS="$testdir"/../src/diffpos} |
[6b8ff5b] | 12 | |
[5476de6] | 13 | SURVEXHOME=$srcdir/../lib |
14 | export SURVEXHOME | |
15 | ||
[0938f88] | 16 | : ${TESTS=${*-"delatend addatend"}} |
[1422c39] | 17 | |
18 | for file in $TESTS ; do | |
[fbc3a20] | 19 | echo $file |
[d4d8efe] | 20 | rm -f "$testdir"/diffpos.tmp |
21 | $DIFFPOS $srcdir/${file}a.pos $srcdir/${file}b.pos > "$testdir"/diffpos.tmp | |
22 | if test -n "$VERBOSE" ; then | |
23 | cat "$testdir"/diffpos.tmp | |
24 | cmp "$testdir"/diffpos.tmp $srcdir/${file}.out || exit 1 | |
25 | else | |
26 | cmp "$testdir"/diffpos.tmp $srcdir/${file}.out > /dev/null || exit 1 | |
27 | fi | |
28 | rm -f "$testdir"/diffpos.tmp | |
[fbc3a20] | 29 | done |
30 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.