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