Skip to content

Commit f239b67

Browse files
committed
IDE test: add missing stripMargin for code interpolator
This means that many tests were failing to compile previously, but we never noticed. FIXME: Somehow, this broke the documentation test in HoverTest (the @usecase part of the doc is missing from the output now)
1 parent f3cf401 commit f239b67

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

language-server/test/dotty/tools/languageserver/SymbolTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class SymbolTest {
2121
code"class $Bar",
2222
code"""package foo
2323
|class $fooFoo {
24-
| class Bar
24+
| class ${m7}Bar$m8
2525
|}
2626
"""
2727
) .symbol("Foo", Foo.range.symInfo("Foo", SymbolKind.Class), fooFoo.range.symInfo("Foo", SymbolKind.Class, "foo"))
28-
.symbol("Bar", Bar.range.symInfo("Bar", SymbolKind.Class))
28+
.symbol("Bar", Bar.range.symInfo("Bar", SymbolKind.Class), (m7 to m8).symInfo("Bar", SymbolKind.Class, "Foo"))
2929
}
3030

3131
@Test def symbolShowModule: Unit = {

language-server/test/dotty/tools/languageserver/util/Code.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ object Code {
106106
}
107107

108108
if (pi.hasNext)
109-
stringBuilder.append(pi.next())
109+
stringBuilder.append(pi.next().stripMargin)
110110

111111
(stringBuilder.result(), positions.result())
112112
}

0 commit comments

Comments
 (0)