()
| 1048 | |
| 1049 | |
| 1050 | def test_extend_style(): |
| 1051 | text = Text.from_markup("[red]foo[/red] [bold]bar") |
| 1052 | text.extend_style(0) |
| 1053 | |
| 1054 | assert text.plain == "foo bar" |
| 1055 | assert text.spans == [Span(0, 3, "red"), Span(4, 7, "bold")] |
| 1056 | |
| 1057 | text.extend_style(-1) |
| 1058 | assert text.plain == "foo bar" |
| 1059 | assert text.spans == [Span(0, 3, "red"), Span(4, 7, "bold")] |
| 1060 | |
| 1061 | text.extend_style(2) |
| 1062 | assert text.plain == "foo bar " |
| 1063 | assert text.spans == [Span(0, 3, "red"), Span(4, 9, "bold")] |
| 1064 | |
| 1065 | |
| 1066 | def test_append_tokens() -> None: |
nothing calls this directly
no test coverage detected