Skip to content

Commit

Permalink
extremely basic end to end scala compile test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbrainard committed Jan 11, 2012
1 parent 6ce0f18 commit 69e8bf9
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions test/compile_test.sh
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}"
}

0 comments on commit 69e8bf9

Please sign in to comment.