From 010b9d1c10de92fb62623b5e7a4f5c35809c7637 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 22 Feb 2013 16:31:32 -0500 Subject: [PATCH] test for #678 --- sbt/src/sbt-test/source-dependencies/ext/A.scala | 5 +++++ sbt/src/sbt-test/source-dependencies/ext/build.sbt | 9 +++++++++ sbt/src/sbt-test/source-dependencies/ext/test | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 sbt/src/sbt-test/source-dependencies/ext/A.scala create mode 100644 sbt/src/sbt-test/source-dependencies/ext/build.sbt create mode 100644 sbt/src/sbt-test/source-dependencies/ext/test diff --git a/sbt/src/sbt-test/source-dependencies/ext/A.scala b/sbt/src/sbt-test/source-dependencies/ext/A.scala new file mode 100644 index 000000000..ad9931075 --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/ext/A.scala @@ -0,0 +1,5 @@ +import sun.net.spi.nameservice.dns.DNSNameService + +object A { + val x = new DNSNameService +} \ No newline at end of file diff --git a/sbt/src/sbt-test/source-dependencies/ext/build.sbt b/sbt/src/sbt-test/source-dependencies/ext/build.sbt new file mode 100644 index 000000000..8aaec76ec --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/ext/build.sbt @@ -0,0 +1,9 @@ +import complete.DefaultParsers._ + +val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.") + +checkIterations := { + val expected: Int = (Space ~> NatBasic).parsed + val actual: Int = (compile in Compile).value.compilations.allCompilations.size + assert(expected == actual, s"Expected $expected compilations, got $actual") +} \ No newline at end of file diff --git a/sbt/src/sbt-test/source-dependencies/ext/test b/sbt/src/sbt-test/source-dependencies/ext/test new file mode 100644 index 000000000..2b01a3de7 --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/ext/test @@ -0,0 +1,7 @@ +# initial compilation +> checkIterations 1 + +# no further compilation should be necessary, since nothing changed +# previously, a dependency on a jar in lib/ext/ would +# always force recompilation +> checkIterations 1 \ No newline at end of file