You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
QA/tests/p_gzip/40-gcmp-gdiff-tests

35 lines
609 B

#!/bin/bash
# Author: Iain Douglas <centos@1n6.org.uk>
function ExitFail {
t_Log "FAIL"
exit $FAIL
}
t_Log "Running $0 Check zcmp and zdiff"
# We don't check that cmp and diff work - that should be done as
# part of p_diffutils.
BASEFILE=/var/tmp/gzip-test
rm $BASEFILE* &>/dev/null
# Create files to work with
cat <<EOF >$BASEFILE.1
Some data to be testing with
EOF
gzip $BASEFILE.1 || exit FAIL
cp $BASEFILE.1.gz $BASEFILE.2.gz
t_Log "Check zcmp"
zcmp $BASEFILE.1.gz $BASEFILE.2.gz || ExitFail
t_Log "Check zdiff"
zdiff $BASEFILE.1.gz $BASEFILE.2.gz
t_CheckExitStatus $?
rm $BASEFILE*