1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 11:56:38 +02:00

api: add function command_options (issue #928)

This commit is contained in:
Sébastien Helleu
2019-02-28 00:14:38 +01:00
parent 64043d5a6c
commit 80b980b2af
43 changed files with 693 additions and 165 deletions
+8
View File
@@ -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