diff options
Diffstat (limited to 'tests/test_control.py')
-rw-r--r-- | tests/test_control.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_control.py b/tests/test_control.py new file mode 100644 index 0000000..d568355 --- /dev/null +++ b/tests/test_control.py @@ -0,0 +1,12 @@ +from rich.control import Control, strip_control_codes + + +def test_control(): + control = Control("FOO") + assert str(control) == "FOO" + + +def test_strip_control_codes(): + assert strip_control_codes("") == "" + assert strip_control_codes("foo\rbar") == "foobar" + assert strip_control_codes("Fear is the mind killer") == "Fear is the mind killer" |