-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #935 from eed3si9n/wip/slf4j
fix: Fix "SLF4J: Failed to load ..." issue by adding slf4j-simple
- Loading branch information
Showing
4 changed files
with
37 additions
and
11 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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ package testpkg | |
|
||
import giter8._ | ||
import verify._ | ||
import java.io.File | ||
import java.io.{ByteArrayOutputStream, File, PrintStream} | ||
import sbt.io.IO | ||
|
||
object LauncherTest extends BasicTestSuite { | ||
|
@@ -22,12 +22,30 @@ object LauncherTest extends BasicTestSuite { | |
} | ||
} | ||
|
||
/* | ||
test("runs [email protected]:scala/scala-seed.g8.git") { | ||
IO.withTemporaryDirectory { dir => | ||
launcher.run(Array("[email protected]:scala/scala-seed.g8.git", "--name=hello"), dir) | ||
assert((dir / "hello" / "build.sbt").exists) | ||
test("log scala/scala-seed.g8") { | ||
val (r, err) = withErr { | ||
IO.withTemporaryDirectory { dir => | ||
launcher.run(Array("scala/scala-seed.g8", "--name=hello"), dir) | ||
assert((dir / "hello" / "build.sbt").exists) | ||
} | ||
} | ||
assert(!err.contains("SLF4J")) | ||
} | ||
*/ | ||
|
||
def withErr[A1](f: => A1): (A1, String) = { | ||
val originalErr = System.err | ||
val byteArrayOutputStream = new ByteArrayOutputStream() | ||
val inMemoryPrintStream = new PrintStream(byteArrayOutputStream) | ||
val result = | ||
try { | ||
System.setErr(inMemoryPrintStream) | ||
val r = f | ||
inMemoryPrintStream.flush() | ||
r | ||
} finally { | ||
System.setErr(originalErr) | ||
} | ||
(result, byteArrayOutputStream.toString) | ||
} | ||
|
||
} |
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