File tree 1 file changed +5
-3
lines changed
compiler/test/dotty/tools/dotc/profile
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ class TraceNameManglingTest extends DottyTest {
27
27
}
28
28
29
29
@ Test def escapeBackslashes (): Unit = {
30
- val isWindows = sys.props(" os.name" ).toLowerCase(Locale .ROOT ) == " windows"
31
- val filename = if isWindows then " /.scala" else " \\ .scala"
30
+ val isWindows = sys.props(" os.name" ).toLowerCase(Locale .ROOT ).nn.contains(" windows" )
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"
32
33
checkTraceEvents(
33
34
"""
34
35
|class /\ :
@@ -46,7 +47,8 @@ class TraceNameManglingTest extends DottyTest {
46
47
raw " setter /\\_= "
47
48
).map(TraceEvent (" typecheck" , _))
48
49
++ 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" )
50
52
)
51
53
)
52
54
}
You can’t perform that action at this time.
0 commit comments