Revert "diff-delta.c: allow delta with empty blob."
[git/git-svn.git] / t / t0001-delta.sh
blob2dd88e503db79c9fe2c68a24cc77b062ec60705c
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
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' \
21 fail=0
22 for src in empty small smallish large largish
24 for dst in empty small smallish large largish
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
35 done
36 done
37 case "$fail" in
38 0) (exit 0) ;;
39 *) (exit $fail) ;;
40 esac
43 test_done