blob: 10ffc32d6f860c5eac316cfe551dcc4ec2604da9 [file]
#!/bin/bash
set -eu
THIS="$(readlink -f "$0")"
THISDIR="$(dirname "${THIS}")"
SUT="$(dirname "${THISDIR}")/makeself.sh"
setupTests() {
temp=$(mktemp -d -t XXXXX)
pushd "${temp}"
mkdir -p src/.git
echo "echo This is a test" > src/startup.sh
}
tearDown() {
popd
rm -rf "${temp}"
}
testTarExtraOpts() {
setupTests
tar_extra="--verbose --exclude .git"
${SUT} --tar-extra "$tar_extra" src src.sh alabel startup.sh
assertEquals $? 0
tearDown
}
# Load and run shUnit2.
source "./shunit2/shunit2"