forked from joergviola/heroku-buildpack-scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extremely basic end to end scala compile test
- Loading branch information
1 parent
6ce0f18
commit 69e8bf9
Showing
1 changed file
with
51 additions
and
0 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,51 @@ | ||
#!/bin/sh | ||
|
||
. ${BUILDPACK_TEST_RUNNER_HOME}/lib/test_utils.sh | ||
|
||
# .sbt_home | ||
# cache unpacking | ||
# no project/build.properties | ||
# no version 0.11.0 or greater | ||
# use of -RC version | ||
# making ivy2 cache | ||
# only using one version of sbt even though build might specify others? | ||
# installation of SBT if doesn't exist | ||
# clean up of old SBT | ||
# use version number from var?? | ||
# ---> extraneous? some of the downloads don't have the version in the name, | ||
# sha1 test | ||
# sbt script gets copied to $SBT_BINDIR/sbt | ||
# sbt.boot.properties is downloaded | ||
# download plugins | ||
# download plugin config | ||
# building app | ||
# failed build | ||
# cache repacking | ||
# no stage target | ||
# build.sbt?? | ||
# force with sbt.version?? | ||
# build.sbt: TaskKey[Unit]("stage") in Compile := { println("Hello Staging!") } | ||
|
||
|
||
testComplile() | ||
{ | ||
cat > ${BUILD_DIR}/blah.scala <<EOF | ||
object Hi { | ||
def main(args: Array[String]) = println("Hi!") | ||
} | ||
EOF | ||
|
||
cat > ${BUILD_DIR}/build.sbt <<EOF | ||
TaskKey[Unit]("stage") in Compile := { println("Hello Staging!") } | ||
EOF | ||
|
||
mkdir -p ${BUILD_DIR}/project | ||
cat > ${BUILD_DIR}/project/build.properties <<EOF | ||
sbt.version=0.11.0 | ||
EOF | ||
|
||
compile | ||
|
||
assertCapturedSuccess | ||
assertFileContains "Hello Staging!" "${STD_OUT}" | ||
} |