1#!/bin/bash
2
3SUT=$(realpath "$(dirname "$0")/../makeself.sh")
4
5setupTests() {
6  temp=$(mktemp -d -t XXXXX)
7  pushd "${temp}"
8  mkdir -p src/.git
9  echo "echo This is a test" > src/startup.sh
10}
11
12tearDown() {
13  popd
14  rm -rf "${temp}"
15}
16
17testTarExtraOpts() {
18  setupTests
19
20  tar_extra="--verbose --exclude .git"
21  ${SUT} --tar-extra "$tar_extra" src src.sh alabel startup.sh
22
23  assertEqual $? 0
24
25  tearDown
26}
27
28source bashunit/bashunit.bash
29