diff options
author | Yash Karandikar | 2020-02-19 17:14:20 -0600 |
---|---|---|
committer | Yash Karandikar | 2020-02-19 17:14:20 -0600 |
commit | ade999c16112e3ca0757b054c10af68a1910a74f (patch) | |
tree | 548ffb774e8a555ab209ba6996efacbf93de620c | |
parent | d6bf48ee534033bee495af776193a0dfa145f866 (diff) | |
parent | bd7af9a9b7d387cf1a764190bf266eb095445ad3 (diff) | |
download | aur-ade999c16112e3ca0757b054c10af68a1910a74f.tar.gz |
Create better tests
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | PKGBUILD | 1 | ||||
-rwxr-xr-x | test.sh | 11 |
3 files changed, 8 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index 842287ea3325..e4f8d6cd23f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,4 @@ language: bash -before_script: - - curl -L "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz" | tar zx - - script: - bash test.sh @@ -11,6 +11,5 @@ depends=('bash' 'git') source=("haur") package () { install -Dm777 "$srcdir"/haur "$pkgdir"/usr/bin/haur - install -Dm777 "$srcdir"/haur-clear-cache "$pkgdir"/usr/bin/haur-clear-cache } md5sums=('fed8ddfb90c4bdf6830b71532834a295') @@ -1,9 +1,14 @@ #!/bin/bash -OUTPUT=$(haur) testEquality() { - assertEquals $OUTPUT "" + if ./haur -g &>/dev/null; then + echo "Test failed" + exit 1 + else + echo "Test successful" + exit 0 + fi } -. shunit2-2.1.6/src/shunit2 +testEquality |