Remove couple scripting tests commented for 2 years
There're similiar tests: hello-resolve-junit-dynver.main.kts hello-resolve-junit-dynver-error.main.kts
This commit is contained in:
committed by
TeamCityServer
parent
9d686165fc
commit
af185ab870
-35
@@ -101,41 +101,6 @@ done
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("Fails on TC for unclear reasons, rewrite to the new API")
|
|
||||||
@Test
|
|
||||||
fun testResolveStdJUnitHelloWorld() {
|
|
||||||
val savedErr = System.err
|
|
||||||
try {
|
|
||||||
System.setErr(PrintStream(NullOutputStream()))
|
|
||||||
Assert.assertNull(compileScript("args-junit-hello-world.kts", StandardArgsScriptTemplateWithLocalResolving::class))
|
|
||||||
} finally {
|
|
||||||
System.setErr(savedErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
val scriptClass = compileScript("args-junit-hello-world.kts", StandardArgsScriptTemplateWithMavenResolving::class)
|
|
||||||
Assert.assertNotNull(scriptClass)
|
|
||||||
captureOut {
|
|
||||||
scriptClass!!.getConstructor(Array<String>::class.java)!!.newInstance(arrayOf("a1"))
|
|
||||||
}.let {
|
|
||||||
Assert.assertEquals(argsHelloWorldOutput.linesSplitTrim(), it.linesSplitTrim())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Ignore("Fails on TC for unclear reasons, rewrite to the new API")
|
|
||||||
@Test
|
|
||||||
fun testResolveStdJUnitDynVer() {
|
|
||||||
val (out, err) = captureOutAndErr {
|
|
||||||
Assert.assertNull(compileScript("args-junit-dynver-error.kts", StandardArgsScriptTemplateWithMavenResolving::class))
|
|
||||||
}
|
|
||||||
Assert.assertTrue(
|
|
||||||
"Expecting error: unresolved reference: assertThrows, got:\nOUT:\n$out\nERR:\n$err",
|
|
||||||
err.contains("error: unresolved reference: assertThrows")
|
|
||||||
)
|
|
||||||
|
|
||||||
val scriptClass = compileScript("args-junit-dynver.kts", StandardArgsScriptTemplateWithMavenResolving::class)
|
|
||||||
Assert.assertNotNull(scriptClass)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun compileScript(
|
private fun compileScript(
|
||||||
scriptFileName: String,
|
scriptFileName: String,
|
||||||
scriptTemplate: KClass<out Any>,
|
scriptTemplate: KClass<out Any>,
|
||||||
|
|||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
@file:DependsOn("junit:junit:(4.11,4.12]")
|
|
||||||
|
|
||||||
org.junit.Assert.assertThrows(NullPointerException::class.java) {
|
|
||||||
throw null!!
|
|
||||||
}
|
|
||||||
|
|
||||||
println("Hello, world!")
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
@file:DependsOn("junit:junit:(4.12,5.0)")
|
|
||||||
|
|
||||||
org.junit.Assert.assertThrows(NullPointerException::class.java) {
|
|
||||||
throw null!!
|
|
||||||
}
|
|
||||||
|
|
||||||
println("Hello, world!")
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user