blob: 174be2832e2ce988bd40580e7c7dab7fb0bac73b (
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
|
#! /bin/sh -pex
# Regression test suite for libhsync.
# Copyright (C) 2000 by Martin Pool.
# OK, this is how we test feeding hsync it's own filth. Starting
# with an empty signature, we generate the difference from one
# file to another.
if [ "$srcdir" = "" ]
then
srcdir=`dirname $0`
fi
srcdir=`cd $srcdir; pwd`
PATH=$srcdir:$PATH
testdir=$srcdir/test-seq
[ -d $testdir ] || mkdir $testdir
cd $testdir
files=`echo in-??`
echo -n `basename $0` ' '
for old in $files
do
echo -n '-'
hsencode $old lt.tmp /dev/null
hsdecode /dev/null sig.tmp old-out.tmp lt.tmp
cmp $old old-out.tmp
for new in $files
do
if [ $old != $new ]
then
echo -n '.'
hsencode $new lt.tmp sig.tmp
hsdecode $old /dev/null new-out.tmp lt.tmp
cmp $new new-out.tmp
fi
done
done
echo
|