From 09f3edc2e6134dbb55998260715e006f6b54cfad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 27 Oct 2017 01:12:35 +0200 Subject: [PATCH] tests: add tests on prefix and color scripting API functions --- tests/scripts/python/testapi.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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