blob: bd7f899d4315eaa33db39425e71f46ee62cf2396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#!/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
|