61 lines
825 B
Plaintext
61 lines
825 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
SUT=$(realpath $(dirname $0)/../makeself.sh)
|
||
|
SOURCE=$(realpath ..)
|
||
|
|
||
|
setupTests() {
|
||
|
temp=`mktemp -d -t XXXXX`
|
||
|
cd "$temp"
|
||
|
mkdir archive
|
||
|
cp -a $SOURCE archive/
|
||
|
$SUT $* archive makeself-test.run "Test $*" echo Testing
|
||
|
}
|
||
|
|
||
|
|
||
|
testQuiet()
|
||
|
{
|
||
|
setupTests
|
||
|
|
||
|
./makeself-test.run --quiet
|
||
|
assertEqual $? 0
|
||
|
}
|
||
|
|
||
|
testGzip()
|
||
|
{
|
||
|
setupTests --gzip
|
||
|
|
||
|
./makeself-test.run --check
|
||
|
assertEqual $? 0
|
||
|
}
|
||
|
|
||
|
testBzip2()
|
||
|
{
|
||
|
setupTests --bzip2
|
||
|
|
||
|
./makeself-test.run --check
|
||
|
assertEqual $? 0
|
||
|
}
|
||
|
|
||
|
testPBzip2()
|
||
|
{
|
||
|
# Skip if pbzip2 is not available
|
||
|
which pbzip2 || return
|
||
|
setupTests --pbzip2
|
||
|
|
||
|
./makeself-test.run --check
|
||
|
assertEqual $? 0
|
||
|
}
|
||
|
|
||
|
testZstd()
|
||
|
{
|
||
|
# Skip if zstd is not available
|
||
|
which zstd || return
|
||
|
setupTests --zstd
|
||
|
|
||
|
./makeself-test.run --check
|
||
|
assertEqual $? 0
|
||
|
}
|
||
|
|
||
|
source bashunit/bashunit.bash
|
||
|
|