diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-09-09 08:54:33 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-09-09 08:54:33 +0200 |
commit | d9555cc5679eebbfa8d5d03c34a6f63e516c7a04 (patch) | |
tree | e647dfb2e0acbd1f1c493de96ed25550a0d2b9a1 /tests | |
parent | 9fada89f96f7b702b8d4c9927badb7155a0c8adf (diff) | |
download | weechat-d9555cc5679eebbfa8d5d03c34a6f63e516c7a04.zip |
scripts: add functions config_enum and config_enum_default in scripting API (issue #1973)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/python/testapi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index ca8ab0d1a..972716a00 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -327,16 +327,20 @@ def test_config(): 'option_delete_cb', '', ) check(ptr_opt_enum != '') + check(weechat.config_enum(ptr_opt_enum) == 1) check(weechat.config_integer(ptr_opt_enum) == 1) check(weechat.config_string(ptr_opt_enum) == 'val2') check(weechat.config_option_set(ptr_opt_enum, 'val1', 1) == 2) # SET_OK_CHANGED check(weechat.config_option_set(ptr_opt_enum, 'val1', 1) == 1) # SET_OK_SAME_VALUE + check(weechat.config_enum(ptr_opt_enum) == 0) check(weechat.config_integer(ptr_opt_enum) == 0) check(weechat.config_string(ptr_opt_enum) == 'val1') + check(weechat.config_enum_default(ptr_opt_enum) == 1) check(weechat.config_integer_default(ptr_opt_enum) == 1) check(weechat.config_string_default(ptr_opt_enum) == 'val2') check(weechat.config_option_reset(ptr_opt_enum, 1) == 2) # SET_OK_CHANGED check(weechat.config_option_reset(ptr_opt_enum, 1) == 1) # SET_OK_SAME_VALUE + check(weechat.config_enum(ptr_opt_enum) == 1) check(weechat.config_integer(ptr_opt_enum) == 1) check(weechat.config_string(ptr_opt_enum) == 'val2') # search option |