diff options
author | Martin Matusiak <numerodix@gmail.com> | 2021-05-05 10:55:49 +1000 |
---|---|---|
committer | Martin Matusiak <numerodix@gmail.com> | 2021-05-05 10:55:49 +1000 |
commit | 300784cc2dd935e225b9b8f66f7d5f9b8b205ef5 (patch) | |
tree | 2ea5744ac4c48845e8e69d8623b58f32dd77083d | |
parent | f96ba723f7d271e7b733fd201bd999d63c3b66c5 (diff) | |
download | ansicolor-300784cc2dd935e225b9b8f66f7d5f9b8b205ef5.tar.gz |
add test for wrap_string in disabled mode
-rw-r--r-- | tests/test_colors.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py index c71e7a1..bc95f71 100644 --- a/tests/test_colors.py +++ b/tests/test_colors.py @@ -143,6 +143,11 @@ def test_wrap_string(): + "there" ) == wrap_string("Hi there", 3, Colors.Red) +def test_wrap_string_disabled(): + with disabled_state(): + assert "Hi|there" == wrap_string("Hi there", 3, Colors.Red) + assert "|i there" == wrap_string("Hi there", 0, Colors.Red) + def test_strip_escapes(): assert "Hi there" == strip_escapes( |