Code

Revert "diff-delta.c: allow delta with empty blob."
[git.git] / t / t0001-delta.sh
1 #!/bin/sh
3 test_description='Deltification regression test'
5 ../test-delta 2>/dev/null
6 test $? == 127 && {
7         echo "* Skipping test-delta regression test."
8         exit 0
9 }
11 . ./test-lib.sh
13 >empty
14 echo small >small
15 echo smallish >smallish
16 cat ../../COPYING >large
17 sed -e 's/GNU/G.N.U/g' large >largish
19 test_expect_success 'No regression in deltify code' \
20 '
21 fail=0
22 for src in empty small smallish large largish
23 do
24     for dst in empty small smallish large largish
25     do
26         if  test-delta -d $src $dst delta-$src-$dst &&
27             test-delta -p $src delta-$src-$dst out-$src-$dst &&
28             cmp $dst out-$src-$dst
29         then
30             echo "* OK ($src->$dst deitify and apply)"
31         else
32             echo "* FAIL ($src->$dst deitify and apply)"
33             fail=1
34         fi
35     done
36 done
37 case "$fail" in
38 0) (exit 0) ;;
39 *) (exit $fail) ;;
40 esac
41 '
43 test_done