source: git/tests/diffpos.tst @ b6de07d

RELEASE/1.0RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since b6de07d was 4d3dfdf, checked in by Olly Betts <olly@…>, 24 years ago

Fixed --survey filtering in img.c and added testcase to diffpos.tst

git-svn-id: file:///home/survex-svn/survex/trunk@1707 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100755
File size: 1.0 KB
RevLine 
[fbc3a20]1#!/bin/sh
[6b8ff5b]2
[d4d8efe]3testdir=`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
9test -n "$*" && VERBOSE=1
10
[87681b8]11test -x "$testdir"/../src/cavern || testdir=.
12
[d4d8efe]13: ${DIFFPOS="$testdir"/../src/diffpos}
[6b8ff5b]14
[87681b8]15SURVEXHOME="$srcdir"/../lib
[5476de6]16export SURVEXHOME
17
[0938f88]18: ${TESTS=${*-"delatend addatend"}}
[1422c39]19
20for file in $TESTS ; do
[fbc3a20]21  echo $file
[87681b8]22  rm -f diffpos.tmp
23  $DIFFPOS $srcdir/${file}a.pos $srcdir/${file}b.pos > diffpos.tmp
[d4d8efe]24  if test -n "$VERBOSE" ; then
[87681b8]25    cat diffpos.tmp
26    cmp diffpos.tmp $srcdir/${file}.out || exit 1
[d4d8efe]27  else
[87681b8]28    cmp diffpos.tmp $srcdir/${file}.out > /dev/null || exit 1
[d4d8efe]29  fi
[87681b8]30  rm -f diffpos.tmp
[fbc3a20]31done
[4d3dfdf]32
33for args in '' '--survey survey' '--survey survey.xyzzy' '--survey xyzzy' ; do
34  echo "diffpos $args"
35  rm -f diffpos.tmp
36  $DIFFPOS $args $srcdir/v0.3d $srcdir/v0.3d > diffpos.tmp
37  if test -n "$VERBOSE" ; then
38    cat diffpos.tmp
39  fi
40  cmp diffpos.tmp /dev/null > /dev/null || exit 1
41  rm -f diffpos.tmp
42done
43 
[fbc3a20]44exit 0
Note: See TracBrowser for help on using the repository browser.