summaryrefslogtreecommitdiff
path: root/tests/scripts/python
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-10-27 01:12:35 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-10-27 01:12:35 +0200
commit09f3edc2e6134dbb55998260715e006f6b54cfad (patch)
tree5340c88832db5941adb6d4f0507344427886dce8 /tests/scripts/python
parent0fd1913ae8080a68fb1b0fcc3dd24c06acb119c7 (diff)
downloadweechat-09f3edc2e6134dbb55998260715e006f6b54cfad.zip
tests: add tests on prefix and color scripting API functions
Diffstat (limited to 'tests/scripts/python')
-rw-r--r--tests/scripts/python/testapi.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py
index f295050a3..2c63856f2 100644
--- a/tests/scripts/python/testapi.py
+++ b/tests/scripts/python/testapi.py
@@ -135,6 +135,18 @@ def test_key():
check(weechat.key_unbind('mouse', 'quiet:area:chat(plugin.test)') == 3)
+def test_display():
+ """Test display functions."""
+ check(weechat.prefix('action') != '')
+ check(weechat.prefix('error') != '')
+ check(weechat.prefix('join') != '')
+ check(weechat.prefix('network') != '')
+ check(weechat.prefix('quit') != '')
+ check(weechat.prefix('unknown') == '')
+ check(weechat.color('green') != '')
+ check(weechat.color('unknown') == '')
+
+
def cmd_test_cb(data, buf, args):
"""Run all the tests."""
weechat.prnt('', '>>>')
@@ -145,6 +157,7 @@ def cmd_test_cb(data, buf, args):
test_strings()
test_lists()
test_key()
+ test_display()
weechat.prnt('', ' > TESTS END')
return weechat.WEECHAT_RC_OK