File: extracttest

package info (click to toggle)
makeself 2.5.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 308 kB
  • sloc: sh: 2,139; makefile: 20
file content (63 lines) | stat: -rw-r--r-- 954 bytes parent folder | download
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
61
62
63
#!/bin/bash
set -eu
THIS="$(readlink -f "$0")"
THISDIR="$(dirname "${THIS}")"
SRCDIR="$(dirname "${THISDIR}")"
SUT="${SRCDIR}/makeself.sh"

setupTests() {
  temp=`mktemp -d -t XXXXX`
  cd "$temp"
  mkdir archive
  cp -a "$SRCDIR" archive/
  $SUT $* archive makeself-test.run "Test $*" echo Testing --tar-extra="--exclude .git"
}


testQuiet()
{
  setupTests

  ./makeself-test.run --quiet
  assertEquals $? 0
}

testGzip()
{
  setupTests --gzip
  
  ./makeself-test.run --check
  assertEquals $? 0
}

testBzip2()
{
  setupTests --bzip2
  
  ./makeself-test.run --check
  assertEquals $? 0
}

testPBzip2()
{
  # Skip if pbzip2 is not available
  which pbzip2 || startSkipping
  setupTests --pbzip2

  ./makeself-test.run --check
  assertEquals $? 0
}

testZstd()
{
  # Skip if zstd is not available
  which zstd || startSkipping
  setupTests --zstd

  ./makeself-test.run --check
  assertEquals $? 0
}

# Load and run shUnit2.
source "./shunit2/shunit2"