diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-02-21 07:06:01 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-16 20:42:18 +0100 |
commit | 66571a0b634ef28307f6d6ceef1ba29c091ca524 (patch) | |
tree | 08cc8a4eb2968952307dbfc394f51383f5dfc45e /tests/scripts/python | |
parent | 7b8e5b36c0e894df40642b3ce993767844edc16b (diff) | |
download | weechat-66571a0b634ef28307f6d6ceef1ba29c091ca524.zip |
core: add configuration version, add API function config_set_version
Diffstat (limited to 'tests/scripts/python')
-rw-r--r-- | tests/scripts/python/testapi.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index 1cf8238ca..72c86c316 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -151,6 +151,11 @@ def config_reload_cb(data, config_file): return weechat.WEECHAT_RC_OK +def config_update_cb(data, config_file, version, data_read): + """Config update callback.""" + return weechat.WEECHAT_RC_OK + + def section_read_cb(data, config_file, section, option_name, value): """Section read callback.""" return weechat.WEECHAT_RC_OK @@ -199,6 +204,9 @@ def test_config(): 'config_reload_cb', 'config_reload_data', ) check(ptr_config != '') + # set version + weechat.config_set_version(ptr_config, 2, + 'config_update_cb', 'config_update_data') # section ptr_section = weechat.config_new_section( ptr_config, 'section1', 0, 0, |