Skip to content

Commit

Permalink
Add encoding to main class name
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejG604 committed May 23, 2023
1 parent 68541d5 commit 14b8f8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ case class Name(raw: String) {
assert(raw.charAt(0) != '`', "Cannot create already-backticked identifiers")
override def toString = s"Name($backticked)"
def encoded = NameTransformer.encode(raw)
def backticked = Name.backtickWrap(raw)
def backticked = Name.backtickWrap(encoded)
}

object Name {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ trait RunScriptTestDefinitions { _: RunTestDefinitions =>
"""//> using dep "com.lihaoyi::os-lib:0.9.1"
|@main def main(args: String*): Unit = println("Hello")
|""".stripMargin,
os.rel / "script_with_directive.sc" ->
os.rel / "script-with-directive.sc" ->
"""//> using dep "com.lihaoyi::os-lib:0.9.1"
|//> using object.wrapper
|@main def main(args: String*): Unit = println("Hello")
Expand All @@ -547,7 +547,7 @@ trait RunScriptTestDefinitions { _: RunTestDefinitions =>
"[warn] Annotation @main in .sc scripts is not supported, it will be ignored, use .scala format instead"
))

val directiveRes = os.proc(TestUtil.cli, "--power", "script_with_directive.sc")
val directiveRes = os.proc(TestUtil.cli, "--power", "script-with-directive.sc")
.call(cwd = root, mergeErrIntoOut = true, stdout = os.Pipe)

val directiveOutputNormalized: String = normalizeConsoleOutput(directiveRes.out.text())
Expand Down

0 comments on commit 14b8f8b

Please sign in to comment.