diff options
author | Martin Matusiak <numerodix@gmail.com> | 2021-05-05 11:10:22 +1000 |
---|---|---|
committer | Martin Matusiak <numerodix@gmail.com> | 2021-05-05 11:10:22 +1000 |
commit | bb0e437db56823129de82e7d521f40959b0a5d86 (patch) | |
tree | b41fa6f89aeee88e18ff4629facbce295b08abe8 | |
parent | 300784cc2dd935e225b9b8f66f7d5f9b8b205ef5 (diff) | |
download | ansicolor-bb0e437db56823129de82e7d521f40959b0a5d86.tar.gz |
add test for set_term_title
-rw-r--r-- | tests/test_colors.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py index bc95f71..0d16bfa 100644 --- a/tests/test_colors.py +++ b/tests/test_colors.py @@ -12,6 +12,7 @@ from ansicolor import strip_escapes from ansicolor import wrap_string from ansicolor import get_code_v2 from ansicolor import colorize_v2 +from ansicolor import set_term_title import ansicolor @@ -179,3 +180,10 @@ def test_justify_formatted(): assert justify_formatted( red("hi"), rjust, 10 ) == " " + red("hi") + + +def test_set_term_title(capsys): + set_term_title('ansicolor demo') + + captured = capsys.readouterr() + assert '\033]2;ansicolor demo\007' == captured.out
\ No newline at end of file |