mirror of
https://github.com/megastep/makeself.git
synced 2025-09-26 19:41:12 +08:00

* move from bashunit to shunit2 move run-tests.sh to test simplify build.yml * back shunit2 to submodule
33 lines
516 B
Bash
33 lines
516 B
Bash
#!/bin/bash
|
|
set -eu
|
|
THIS="$(realpath "$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"
|
|
|