summaryrefslogtreecommitdiff
path: root/tests/scripts/python/testapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/python/testapi.py')
-rw-r--r--tests/scripts/python/testapi.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py
index 5a4c19190..036d0bb92 100644
--- a/tests/scripts/python/testapi.py
+++ b/tests/scripts/python/testapi.py
@@ -200,6 +200,13 @@ def test_hooks():
weechat.unhook(hook_cmplt)
+def test_command():
+ """Test command functions."""
+ check(weechat.command('', '/mute') == 0)
+ check(weechat.command_options('', '/mute', {'commands': '*,!print'}) == 0)
+ check(weechat.command_options('', '/mute', {'commands': '*,!mute'}) == -1)
+
+
def infolist_cb(data, infolist_name, pointer, arguments):
"""Infolist callback."""
infolist = weechat.infolist_new()
@@ -244,6 +251,7 @@ def cmd_test_cb(data, buf, args):
test_key()
test_display()
test_hooks()
+ test_command()
test_infolist()
weechat.prnt('', ' > TESTS END')
return weechat.WEECHAT_RC_OK