diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_split_segments_infinite_loop.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_split_segments_infinite_loop.svg new file mode 100644 index 0000000000..fb874be20f --- /dev/null +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_split_segments_infinite_loop.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CodeApp + + + + + + + + + + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▎ +1  x + + + + + + + + + + + + + + + + + + + + + +▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▎ + + + diff --git a/tests/snapshot_tests/snapshot_apps/split_segments.py b/tests/snapshot_tests/snapshot_apps/split_segments.py index cb80b63e84..9acb6fe28b 100644 --- a/tests/snapshot_tests/snapshot_apps/split_segments.py +++ b/tests/snapshot_tests/snapshot_apps/split_segments.py @@ -1,7 +1,7 @@ from textual.app import App, ComposeResult from textual.widgets import TextArea -FAIL_TEXT = "x " +FAIL_TEXT = "x" class CodeApp(App): diff --git a/tests/snapshot_tests/test_snapshots.py b/tests/snapshot_tests/test_snapshots.py index b184b9a247..019f49f505 100644 --- a/tests/snapshot_tests/test_snapshots.py +++ b/tests/snapshot_tests/test_snapshots.py @@ -2420,5 +2420,9 @@ def on_mount(self) -> None: def test_split_segments_infinite_loop(snap_compare): - """Regression test for https://github.com/Textualize/textual/issues/5151""" + """Regression test for https://github.com/Textualize/textual/issues/5151 + + Should be a bare-bones text editor containing "x" + + """ assert snap_compare(SNAPSHOT_APPS_DIR / "split_segments.py")