minor: avoid double reporting of scripting diagnostics
also fix arror reporting for scripts with location
This commit is contained in:
@@ -245,9 +245,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
|
||||
runProcess(
|
||||
"kotlin", "-no-stdlib", "-e", "println(42)",
|
||||
expectedExitCode = 1,
|
||||
expectedStderr = """error: unresolved reference: println (script.kts:1:1)
|
||||
error: no script runtime was found in the classpath: class 'kotlin.script.templates.standard.ScriptTemplateWithArgs' not found. Please add kotlin-script-runtime.jar to the module dependencies. (script.kts:1:1)
|
||||
script.kts:1:1: error: unresolved reference: println
|
||||
expectedStderr = """script.kts:1:1: error: unresolved reference: println
|
||||
println(42)
|
||||
^
|
||||
script.kts:1:1: error: no script runtime was found in the classpath: class 'kotlin.script.templates.standard.ScriptTemplateWithArgs' not found. Please add kotlin-script-runtime.jar to the module dependencies.
|
||||
@@ -300,8 +298,7 @@ println(42)
|
||||
)
|
||||
runProcess(
|
||||
"kotlin", "-Xallow-any-scripts-in-source-roots", "-howtorun", ".kts", "$testDataDirectory/noInline.myscript",
|
||||
expectedExitCode = 1, expectedStderr = """error: unresolved reference: CompilerOptions (noInline.myscript:1:7)
|
||||
compiler/testData/launcher/noInline.myscript:1:7: error: unresolved reference: CompilerOptions
|
||||
expectedExitCode = 1, expectedStderr = """compiler/testData/launcher/noInline.myscript:1:7: error: unresolved reference: CompilerOptions
|
||||
@file:CompilerOptions("-Xno-inline")
|
||||
^
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user