-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from paulp/add-bats-test
Add test runner.
- Loading branch information
Showing
23 changed files
with
1,478 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
script: ./bin/run-tests --tap | ||
language: c | ||
notifications: | ||
email: | ||
on_success: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ivycp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
# | ||
|
||
set -e | ||
cd "$(dirname "$0")/.." | ||
[ -d bats ] || git clone https://github.com/sstephenson/bats.git bats | ||
./bats/bin/bats "$@" ./test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../sbt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bats | ||
|
||
load test_helper | ||
|
||
setup() { | ||
create_project | ||
create_launcher "${sbt_release_version}" | ||
} | ||
|
||
@test "loads .sbt_completion.sh" { | ||
cd "${sbt_project}" | ||
echo 'echo "${BASH_SOURCE[0]} has been loaded."' > .sbt_completion.sh | ||
stub java true | ||
run sbt | ||
assert_success | ||
assert_output ".sbt_completion.sh has been loaded." | ||
unstub java | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bats | ||
|
||
load test_helper | ||
|
||
setup() { | ||
create_launcher "${sbt_release_version}" | ||
mkdir -p "${TMP}/newproject" | ||
cd "${TMP}/newproject" | ||
} | ||
|
||
@test "fails to start sbt on empty project" { | ||
assert [ ! -f "build.sbt" ] | ||
assert [ ! -d "project" ] | ||
run sbt | ||
assert_failure | ||
} | ||
|
||
@test "starts sbt on empty project if -sbt-create was given" { | ||
assert [ ! -f "build.sbt" ] | ||
assert [ ! -d "project" ] | ||
stub java true | ||
run sbt -sbt-create | ||
assert_success | ||
unstub java | ||
} |
Oops, something went wrong.