-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #672 from typelevel/fix/ast-to-string
fix ElementContainer.toString
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
core/shared/src/test/scala/laika/ast/ElementContainerToStringSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package laika.ast | ||
|
||
import munit.FunSuite | ||
|
||
class ElementContainerToStringSpec extends FunSuite { | ||
|
||
test("toString for ElementContainer") { | ||
val element = Paragraph(Text("some"), Emphasized("em"), Text("text")) | ||
val expected = """Paragraph - Spans: 3 | ||
|. Text - 'some' | ||
|. Emphasized - Spans: 1 | ||
|. . Text - 'em' | ||
|. Text - 'text'""".stripMargin | ||
assertEquals(element.toString, expected) | ||
} | ||
|
||
} |