aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-05-01 00:00:40 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-05-01 00:11:29 +0300
commit0764e86815875f548fecbfe1e23e12655ab05c8a (patch)
tree42b3e0884639fccb7010a17776b86de5b0ea7940 /contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py
parentcbdd1443ec0c6e62ead9f16d79a0b4d9494bc7fe (diff)
downloadydb-0764e86815875f548fecbfe1e23e12655ab05c8a.tar.gz
Intermediate changes
commit_hash:b4e93de24dabfc523769bc504619e926eee6cafe
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py')
-rw-r--r--contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py b/contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py
index 843aac16191..60f9cdf459b 100644
--- a/contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py
+++ b/contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py
@@ -274,7 +274,7 @@ def test_split_lines_3():
lines = list(split_lines([("class:a", "\n")]))
assert lines == [
- [],
+ [("class:a", "")],
[("class:a", "")],
]
@@ -284,3 +284,15 @@ def test_split_lines_3():
assert lines == [
[("class:a", "")],
]
+
+
+def test_split_lines_4():
+ "Edge cases: inputs starting and ending with newlines."
+ # -1-
+ lines = list(split_lines([("class:a", "\nline1\n")]))
+
+ assert lines == [
+ [("class:a", "")],
+ [("class:a", "line1")],
+ [("class:a", "")],
+ ]