summaryrefslogtreecommitdiff
path: root/xdelta1/runtest
blob: 1088d7b0f85da764a1a208d7cdd9f34d21f1e139 (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
#!/bin/sh

OUT1=$TMPDIR/out1
OUT2=$TMPDIR/out2
OUT3=$TMPDIR/out3
XDELTA=./xdelta

while test $# -gt 1; do

  FROM=$1
  TO=$2

  shift

  if test -d $FROM -o -d $TO; then
    BOGUS=what
  else
    echo testing $FROM $TO ...
    $XDELTA delta -q0 $FROM $TO $OUT1
    $XDELTA patch $OUT1 $FROM $OUT2
    cmp $OUT2 $TO

    echo testing $TO $FROM ...
    $XDELTA delta -q0 $TO $FROM $OUT1
    $XDELTA patch $OUT1 $TO $OUT2
    cmp $OUT2 $FROM

    echo testing $TO $TO ...
    $XDELTA delta -q0 $TO $TO $OUT1
    $XDELTA patch $OUT1 $TO $OUT2
    cmp $OUT2 $TO

    echo testing $FROM $TO ...
    $XDELTA delta -q6 $FROM $TO $OUT1
    $XDELTA patch $OUT1 $FROM $OUT2
    cmp $OUT2 $TO

    echo testing $TO $FROM ...
    $XDELTA delta -q6 $TO $FROM $OUT1
    $XDELTA patch $OUT1 $TO $OUT2
    cmp $OUT2 $FROM

    echo testing $TO $TO ...
    $XDELTA delta -q6 $TO $TO $OUT1
    $XDELTA patch $OUT1 $TO $OUT2
    cmp $OUT2 $TO
    fi
done;