Skip to content

Commit cf6018a

Browse files
committed
Acknowledge that filename with backslash cannot be created on Windows
1 parent d26d87f commit cf6018a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/test/dotty/tools/dotc/profile/TraceNameManglingTest.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class TraceNameManglingTest extends DottyTest {
2828

2929
@Test def escapeBackslashes(): Unit = {
3030
val isWindows = sys.props("os.name").toLowerCase(Locale.ROOT).nn.contains("windows")
31-
val filename = if isWindows then "/.scala" else "\\.scala"
31+
// It is not possible to create a file with backslash in name on Windows
32+
val filename = if isWindows then "test.scala" else "\\.scala"
3233
checkTraceEvents(
3334
"""
3435
|class /\ :
@@ -46,7 +47,8 @@ class TraceNameManglingTest extends DottyTest {
4647
raw"setter /\\_="
4748
).map(TraceEvent("typecheck", _))
4849
++ Set(
49-
TraceEvent("file", if isWindows then "/.scala" else "\\\\.scala")
50+
// See comment aboce for Windows limitations
51+
TraceEvent("file", if isWindows then filename else "\\\\.scala")
5052
)
5153
)
5254
}

0 commit comments

Comments
 (0)