diff --git a/tests/test_content.py b/tests/test_content.py index 5020db8f9..70e30db56 100644 --- a/tests/test_content.py +++ b/tests/test_content.py @@ -136,6 +136,14 @@ def test_add() -> None: assert content.spans == [Span(0, 3, "red"), Span(4, 7, "blue")] assert content.cell_length == 7 +def test_radd() -> NOne + """Test reverse addition.""" + assert "foo" + Content("bar") == Content("foobar") + + # Test spans after addition + content = "foo " + Content.styled("bar", "blue") + assert str(content) == "foo bar" + assert content.spans == [Span(4, 7, "blue")] def test_from_markup(): """Test simple parsing of content markup."""