File: test-chain.sh

package info (click to toggle)
libhsync 0.5.7-1.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,060 kB
  • ctags: 543
  • sloc: sh: 7,944; ansic: 5,413; makefile: 154
file content (40 lines) | stat: -rwxr-xr-x 909 bytes parent folder | download
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
#! /bin/sh -pe

# Regression test suite for libhsync.

# Copyright (C) 2000 by Martin Pool
# $Id: test-chain.sh,v 1.14 2000/07/29 18:24:01 mbp Exp $

# 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.

diff=$tmpdir/diff.tmp
files=`echo $srcdir/*.c|head -20`
out=$tmpdir/out.tmp
sig=$tmpdir/sig.tmp
newsig=$tmpdir/newsig.tmp

fromsig=$tmpdir/fromsig.tmp
fromlt=$tmpdir/fromlt.tmp
ltfile=$tmpdir/lt.tmp

for from in $files
do
    countdown
    run_test hsnad $debug $stats /dev/null <$from >$ltfile
    run_test hsdecode $debug $stats /dev/null $sig $out $ltfile

    run_test cmp $out $from

    for new in $files
    do
	countdown
        run_test hsnad $debug $stats $sig <$new >$diff
        run_test hsdecode $debug $stats $from $newsig $out $diff 
    
        run_test cmp $out $new
    done
done