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

api: add functions config_option_get_string and config_option_get_pointer in scripting API

This commit is contained in:
Sébastien Helleu
2024-03-03 10:32:11 +01:00
parent 0bf560f9b7
commit c3eff15a56
22 changed files with 349 additions and 3 deletions
+6
View File
@@ -355,6 +355,12 @@ def test_config():
check(weechat.config_string_to_boolean('1') == 1)
# rename option
weechat.config_option_rename(ptr_opt_bool, 'option_bool_renamed')
# get string property of option
check(weechat.config_option_get_string(ptr_opt_bool, 'type') == 'boolean')
check(weechat.config_option_get_string(ptr_opt_bool, 'name') == 'option_bool_renamed')
# get pointer property of option
check(weechat.config_option_get_pointer(ptr_opt_bool, 'config_file') == ptr_config)
check(weechat.config_option_get_pointer(ptr_opt_bool, 'section') == ptr_section)
# read config (create it because it does not exist yet)
check(weechat.config_read(ptr_config) == 0) # CONFIG_READ_OK
# write config