Merging upstream version 1.13.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e51de8f895
commit
a4df31fc03
21 changed files with 720 additions and 282 deletions
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# check script for Lziprecover - Data recovery tool for lzipped files
|
||||
# Copyright (C) 2009, 2010, 2011 Antonio Diaz Diaz.
|
||||
# Copyright (C) 2009, 2010, 2011, 2012 Antonio Diaz Diaz.
|
||||
#
|
||||
# This script is free software: you have unlimited permission
|
||||
# to copy, distribute and modify it.
|
||||
|
@ -9,11 +9,12 @@ LC_ALL=C
|
|||
export LC_ALL
|
||||
objdir=`pwd`
|
||||
testdir=`cd "$1" ; pwd`
|
||||
LZIP="${objdir}"/lziprecover
|
||||
LZIPRECOVER="${objdir}"/lziprecover
|
||||
framework_failure() { echo "failure in testing framework" ; exit 1 ; }
|
||||
|
||||
if [ ! -x "${LZIPRECOVER}" ] ; then
|
||||
echo "${LZIPRECOVER}: cannot execute"
|
||||
if [ ! -x "${LZIP}" ] ; then
|
||||
echo "${LZIP}: cannot execute"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -40,7 +41,19 @@ fail=0
|
|||
|
||||
printf "testing lziprecover-%s..." "$2"
|
||||
|
||||
"${LZIPRECOVER}" -D 921-1921 -o copy ${in_lz} || fail=1
|
||||
"${LZIP}" -t "${testdir}"/test_v0.lz || fail=1
|
||||
printf .
|
||||
"${LZIP}" -cd "${testdir}"/test_v0.lz > copy || fail=1
|
||||
cmp ${in} copy || fail=1
|
||||
printf .
|
||||
|
||||
"${LZIP}" -t "${testdir}"/test_v1.lz || fail=1
|
||||
printf .
|
||||
"${LZIP}" -cd "${testdir}"/test_v1.lz > copy || fail=1
|
||||
cmp ${in} copy || fail=1
|
||||
printf .
|
||||
|
||||
"${LZIPRECOVER}" -D 921-1921 -fo copy ${in_lz} || fail=1
|
||||
cmp ${inD} copy || fail=1
|
||||
printf .
|
||||
"${LZIPRECOVER}" -D 921,1000 ${in_lz} > copy || fail=1
|
||||
|
@ -102,6 +115,11 @@ for i in 1 2 3 ; do
|
|||
printf .
|
||||
done
|
||||
|
||||
cat ${in_lz} > anyothername || framework_failure
|
||||
"${LZIP}" -d anyothername || fail=1
|
||||
cmp ${in} anyothername.out || fail=1
|
||||
printf .
|
||||
|
||||
echo
|
||||
if [ ${fail} = 0 ] ; then
|
||||
echo "tests completed successfully."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue