mirror of https://github.com/sbt/sbt.git
Merge pull request #7521 from adpi2/sbt2-revive-tests
This commit is contained in:
commit
35520e6cfe
|
|
@ -4,7 +4,6 @@
|
|||
* Copyright 2008 - 2010, Mark Harrah
|
||||
* Licensed under Apache License 2.0 (see LICENSE)
|
||||
*/
|
||||
/*
|
||||
package sbt
|
||||
|
||||
import sbt.Def.{ ScopedKey, displayFull, displayMasked }
|
||||
|
|
@ -20,7 +19,7 @@ import hedgehog.runner._
|
|||
* Tests that the scoped key parser in Act can correctly parse a ScopedKey converted by Def.show*Key.
|
||||
* This includes properly resolving omitted components.
|
||||
*/
|
||||
object ParseKey extends Properties {
|
||||
object ParseKeySpec extends Properties {
|
||||
val exampleCount = 1000
|
||||
|
||||
override def tests: List[Test] = List(
|
||||
|
|
@ -195,4 +194,3 @@ object ParseKey extends Properties {
|
|||
allProjects(label)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
* Copyright 2008 - 2010, Mark Harrah
|
||||
* Licensed under Apache License 2.0 (see LICENSE)
|
||||
*/
|
||||
/*
|
||||
package sbt
|
||||
|
||||
import java.net.URI
|
||||
|
|
@ -81,4 +80,3 @@ object ParserSpec extends Properties {
|
|||
.log(s"$string parsed back to $resultStr rather than $scopedKey")
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* Copyright 2008 - 2010, Mark Harrah
|
||||
* Licensed under Apache License 2.0 (see LICENSE)
|
||||
*/
|
||||
/*
|
||||
package sbt
|
||||
|
||||
import java.io._
|
||||
|
|
@ -18,15 +17,14 @@ import sbt.internal.util.{
|
|||
GlobalLogging,
|
||||
MainAppender,
|
||||
Settings,
|
||||
Terminal => ITerminal,
|
||||
Terminal,
|
||||
}
|
||||
import sbt.internal.inc.PlainVirtualFileConverter
|
||||
|
||||
object PluginCommandTestPlugin0 extends AutoPlugin { override def requires = empty }
|
||||
|
||||
package subpackage {
|
||||
|
||||
object PluginCommandTestPlugin1 extends AutoPlugin { override def requires = empty }
|
||||
|
||||
}
|
||||
|
||||
object PluginCommandTest extends verify.BasicTestSuite {
|
||||
|
|
@ -73,7 +71,7 @@ object FakeState {
|
|||
val logFile = File.createTempFile("sbt", ".log")
|
||||
try {
|
||||
val state = FakeState(logFile, enabledPlugins: _*)
|
||||
ITerminal.withOut(new PrintStream(outBuffer, true)) {
|
||||
Terminal.withOut(new PrintStream(outBuffer, true)) {
|
||||
MainLoop.processCommand(Exec(input, None), state)
|
||||
}
|
||||
new String(outBuffer.toByteArray)
|
||||
|
|
@ -115,7 +113,8 @@ object FakeState {
|
|||
Nil
|
||||
)
|
||||
|
||||
val pluginData = PluginData(Nil, Nil, None, None, Nil, Nil, Nil, Nil, Nil, None)
|
||||
val converter = PlainVirtualFileConverter.converter
|
||||
val pluginData = PluginData(Nil, converter)
|
||||
val builds: DetectedModules[BuildDef] = new DetectedModules[BuildDef](Nil)
|
||||
|
||||
val detectedAutoPlugins: Seq[DetectedAutoPlugin] =
|
||||
|
|
@ -123,7 +122,7 @@ object FakeState {
|
|||
val detectedPlugins = new DetectedPlugins(detectedAutoPlugins, builds)
|
||||
val loadedPlugins =
|
||||
new LoadedPlugins(base, pluginData, ClassLoader.getSystemClassLoader, detectedPlugins)
|
||||
val buildUnit = new BuildUnit(base.toURI, base, loadedDefinitions, loadedPlugins)
|
||||
val buildUnit = new BuildUnit(base.toURI, base, loadedDefinitions, loadedPlugins, converter)
|
||||
|
||||
val (partBuildUnit: PartBuildUnit, _) = Load.loaded(buildUnit)
|
||||
val loadedBuildUnit = Load.resolveProjects(base.toURI, partBuildUnit, _ => testProject.id)
|
||||
|
|
@ -167,4 +166,3 @@ object FakeState {
|
|||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* Copyright 2008 - 2010, Mark Harrah
|
||||
* Licensed under Apache License 2.0 (see LICENSE)
|
||||
*/
|
||||
/*
|
||||
package testpkg
|
||||
|
||||
import java.net.URI
|
||||
|
|
@ -87,4 +86,3 @@ object CompletionSpec extends Properties {
|
|||
.log(s"structure: $structure")
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue