Blame tests/p_gzip/10-test-binaries

iaind 56c8c8
#!/bin/bash
iaind 56c8c8
# Author: Iain Douglas <centos@1n6.org.uk>
iaind 56c8c8
#
iaind 56c8c8
# Check the binaries from the package exist and run ok
iaind 56c8c8
iaind 56c8c8
function ExitFail {
iaind 56c8c8
    t_Log "Fail"
iaind 56c8c8
    exit $FAIL
iaind 56c8c8
}
iaind 56c8c8
t_Log "Checking binaries are present and run"
iaind 56c8c8
iaind 56c8c8
[ "$(readlink -e /usr/bin/gunzip)" == "/bin/gunzip" ] || ExitFail
iaind 56c8c8
[ "$(readlink -e /usr/bin/gzip)" == "/bin/gzip" ] || ExitFail
iaind 56c8c8
iaind 56c8c8
for binary in gunzip gzip zcat gzexe zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
iaind 56c8c8
do
iaind 56c8c8
    echo -n "$binary "
iaind 56c8c8
    $binary --version &>/dev/null || ExitFail
iaind 56c8c8
done
iaind 56c8c8
echo ""
iaind 56c8c8
t_Log "PASS"