File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/test/dotty/tools/dotc/profile Expand file tree Collapse file tree 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 {
2727 }
2828
2929 @ 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"
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 }
You can’t perform that action at this time.
0 commit comments