Skip to content

Commit

Permalink
Added more unit tests for checking extraction integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
megastep committed May 5, 2017
1 parent 2260c04 commit 5970414
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
_site
test
.*-cache/
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ before_install:
script:
- cd test
- ./datetest
- ./extracttest
49 changes: 49 additions & 0 deletions test/extracttest
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/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
assert $?
}

testGzip()
{
setupTests --gzip

./makeself-test.run --check
assert $?
}

testBzip2()
{
setupTests --bzip2

./makeself-test.run --check
assert $?
}

testBzip2()
{
setupTests --pbzip2

./makeself-test.run --check
assert $?
}


source bashunit/bashunit.bash

0 comments on commit 5970414

Please sign in to comment.