mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[javadoc] Add markdown code block formatter tests
IJ-CR-176793 GitOrigin-RevId: e5eeeb40490d99ba3a78fc4e856b7c18dbc686a3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
de5dde0a13
commit
332aa07430
+34
-3
@@ -2314,20 +2314,51 @@ public class Test {
|
||||
RIGHT_MARGIN = 120
|
||||
}
|
||||
|
||||
doTextTest("""
|
||||
val before = """
|
||||
/// only this should be reformated
|
||||
/// ```java
|
||||
/// @Annotation public static final @Annotation2 List<String> myList = List.of("a", "b", "c");
|
||||
/// ```
|
||||
public class Foo {
|
||||
}
|
||||
""".trimIndent(), """
|
||||
""".trimIndent()
|
||||
|
||||
val after = """
|
||||
/// only this should be reformated
|
||||
/// ```java
|
||||
/// @Annotation public static final @Annotation2 List<String> myList = List.of("a", "b", "c");
|
||||
/// ```
|
||||
public class Foo {
|
||||
}
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
|
||||
doTextTest(before, after)
|
||||
doTextTest(after, after)
|
||||
}
|
||||
|
||||
fun testMarkdownTildeCodeBlock() {
|
||||
settings.apply {
|
||||
WRAP_COMMENTS = true
|
||||
RIGHT_MARGIN = 120
|
||||
}
|
||||
|
||||
val before = """
|
||||
/// only this should be reformated
|
||||
/// ~~~java ~
|
||||
/// @Annotation public static final @Annotation2 List<String> myList = List.of("a", "b", "c");
|
||||
/// ~~~
|
||||
public class Foo {
|
||||
}
|
||||
""".trimIndent()
|
||||
val after = """
|
||||
/// only this should be reformated
|
||||
/// ~~~java ~
|
||||
/// @Annotation public static final @Annotation2 List<String> myList = List.of("a", "b", "c");
|
||||
/// ~~~
|
||||
public class Foo {
|
||||
}
|
||||
""".trimIndent()
|
||||
doTextTest(before, after)
|
||||
doTextTest(after, after)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user