summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-02-28 00:14:38 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-02-28 20:19:18 +0100
commit80b980b2af71faa9a2d825c61a5d41d7ace0dc60 (patch)
tree64056a5a5fb428869b62c6c0309155c67acbc432 /tests/scripts
parent64043d5a6c4ca258c40a8c39d0f58fc4a16c86b9 (diff)
downloadweechat-80b980b2af71faa9a2d825c61a5d41d7ace0dc60.zip
api: add function command_options (issue #928)
Diffstat (limited to 'tests/scripts')
-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