-
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.
Didn't work at all, amazingly enough - it was using regexp style instead of globbing. Also broke in the face of blank lines. jvm_opts files can now contain lines starting a # and blank lines, but lines with a non-initial # are options. Used new testing abilities to include a test. Whoo.
- Loading branch information
Showing
3 changed files
with
46 additions
and
7 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
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,41 @@ | ||
#!/usr/bin/env bats | ||
|
||
load test_helper | ||
|
||
setup() { | ||
create_project | ||
create_launcher "${sbt_release_version}" | ||
} | ||
|
||
stub_java() { | ||
stub java 'for arg; do echo "$arg"; done' | ||
} | ||
|
||
configFile () { cat <<EOM | ||
# Comment 1 | ||
# Comment 2, followed by blank line | ||
-Xmx1g | ||
-Xss4m | ||
# Comment 4 | ||
EOM | ||
} | ||
|
||
expectedOutput () { cat <<EOM | ||
-Xmx1g | ||
-Xss4m | ||
-jar | ||
${TMP}/.sbt/launchers/0.13.1/sbt-launch.jar | ||
about | ||
EOM | ||
} | ||
|
||
@test "tolerates blank lines and comments in jvm_opts file" { | ||
stub_java | ||
configFile >jvm_opts | ||
run sbt -jvm-opts jvm_opts about | ||
assert_success | ||
expectedOutput | assert_output | ||
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