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.

37 lines
565 B

#!/bin/bash
#Author: Iain Douglas <centos@1n6.org.uk>
function ExitFail {
t_Log "FAIL"
exit $FAIL
}
t_Log Running $0 Check gzexe
# Create a file to work with
t_Log "Create file to work with"
FILE=/var/tmp/gzexe-test-script
rm $FILE* $OUTPUT &>/dev/null
cat <<EOF >$FILE
#!/bin/bash
echo "Hello World"
EOF
chmod +x $FILE
$FILE | grep -q "Hello World" || ExitFail
t_Log "Run file through gzexe"
gzexe $FILE &>/dev/null || ExitFail
t_Log "Check resultant file runs"
$FILE | grep -q "Hello World"
t_CheckExitStatus $?
#Cleanup
rm $FILE* 2>/dev/null