summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-13 00:43:15 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-13 00:43:15 (GMT)
commit86c9523305f75818d4dce485a18f6b4ccae78233 (patch)
tree798522f29829ab4834c0cd961f5caf8398d83e9e
parentc7a45bd20e4ec141fdc15f36d261a45d51d95693 (diff)
downloadgit-86c9523305f75818d4dce485a18f6b4ccae78233.zip
git-86c9523305f75818d4dce485a18f6b4ccae78233.tar.gz
git-86c9523305f75818d4dce485a18f6b4ccae78233.tar.bz2
Revert "Add deltifier test."
This reverts e726715a52e25d8035c89d4ea09398599610737e commit, because reverting diff-delta emptiness change would break this test.
-rwxr-xr-xt/t0001-delta.sh43
-rw-r--r--test-delta.c11
2 files changed, 2 insertions, 52 deletions
diff --git a/t/t0001-delta.sh b/t/t0001-delta.sh
deleted file mode 100755
index 2dd88e5..0000000
--- a/t/t0001-delta.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-test_description='Deltification regression test'
-
-../test-delta 2>/dev/null
-test $? == 127 && {
- echo "* Skipping test-delta regression test."
- exit 0
-}
-
-. ./test-lib.sh
-
->empty
-echo small >small
-echo smallish >smallish
-cat ../../COPYING >large
-sed -e 's/GNU/G.N.U/g' large >largish
-
-test_expect_success 'No regression in deltify code' \
-'
-fail=0
-for src in empty small smallish large largish
-do
- for dst in empty small smallish large largish
- do
- if test-delta -d $src $dst delta-$src-$dst &&
- test-delta -p $src delta-$src-$dst out-$src-$dst &&
- cmp $dst out-$src-$dst
- then
- echo "* OK ($src->$dst deitify and apply)"
- else
- echo "* FAIL ($src->$dst deitify and apply)"
- fail=1
- fi
- done
-done
-case "$fail" in
-0) (exit 0) ;;
-*) (exit $fail) ;;
-esac
-'
-
-test_done
diff --git a/test-delta.c b/test-delta.c
index cc05794..1be8ee0 100644
--- a/test-delta.c
+++ b/test-delta.c
@@ -38,10 +38,7 @@ int main(int argc, char *argv[])
return 1;
}
from_size = st.st_size;
- if (from_size)
- from_buf = mmap(NULL, from_size, PROT_READ, MAP_PRIVATE, fd, 0);
- else
- from_buf = "";
+ from_buf = mmap(NULL, from_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (from_buf == MAP_FAILED) {
perror(argv[2]);
close(fd);
@@ -55,11 +52,7 @@ int main(int argc, char *argv[])
return 1;
}
data_size = st.st_size;
-
- if (data_size)
- data_buf = mmap(NULL, data_size, PROT_READ, MAP_PRIVATE, fd, 0);
- else
- data_buf = "";
+ data_buf = mmap(NULL, data_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (data_buf == MAP_FAILED) {
perror(argv[3]);
close(fd);