diff options
author | robot-piglet <[email protected]> | 2025-05-01 00:00:40 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-05-01 00:11:29 +0300 |
commit | 0764e86815875f548fecbfe1e23e12655ab05c8a (patch) | |
tree | 42b3e0884639fccb7010a17776b86de5b0ea7940 /contrib/python/prompt-toolkit/py3/tests | |
parent | cbdd1443ec0c6e62ead9f16d79a0b4d9494bc7fe (diff) |
Intermediate changes
commit_hash:b4e93de24dabfc523769bc504619e926eee6cafe
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/tests')
-rw-r--r-- | contrib/python/prompt-toolkit/py3/tests/test_filter.py | 2 | ||||
-rw-r--r-- | contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/contrib/python/prompt-toolkit/py3/tests/test_filter.py b/contrib/python/prompt-toolkit/py3/tests/test_filter.py index f7184c286f2..70ddd5cdf59 100644 --- a/contrib/python/prompt-toolkit/py3/tests/test_filter.py +++ b/contrib/python/prompt-toolkit/py3/tests/test_filter.py @@ -16,7 +16,7 @@ def test_always(): def test_invert(): assert not (~Always())() - assert ~Never()() + assert (~Never())() c = ~Condition(lambda: False) assert c() 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", "")], + ] |