From b1404b02777c58d5e104082f349dff201bd12ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 1 Aug 2022 21:03:44 +0200 Subject: =?UTF-8?q?scripts:=20fix=20issue=20with=20year=20=E2=89=A5=202038?= =?UTF-8?q?=20in=20functions=20print=5Fdate=5Ftags=20and=20print=5Fy=5Fdat?= =?UTF-8?q?e=5Ftags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Affected plugins: python, lua, tcl, guile, javascript. --- tests/scripts/python/testapi.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/scripts/python/testapi.py') diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index a9aaffee7..c4630981e 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -170,6 +170,16 @@ def test_display(): check(weechat.color('unknown') == '') weechat.prnt('', '## test print core buffer') weechat.prnt_date_tags('', 946681200, 'tag1,tag2', '## test print_date_tags core buffer') + weechat.prnt_date_tags('', 5680744830, 'tag1,tag2', '## test print_date_tags core buffer, year 2150') + hdata_buffer = weechat.hdata_get('buffer') + hdata_lines = weechat.hdata_get('lines') + hdata_line = weechat.hdata_get('line') + hdata_line_data = weechat.hdata_get('line_data') + buffer = weechat.buffer_search_main() + own_lines = weechat.hdata_pointer(hdata_buffer, buffer, 'own_lines') + line = weechat.hdata_pointer(hdata_lines, own_lines, 'last_line') + data = weechat.hdata_pointer(hdata_line, line, 'data') + check(weechat.hdata_time(hdata_line_data, data, 'date') == 5680744830) buffer = weechat.buffer_new('test_formatted', 'buffer_input_cb', '', 'buffer_close_cb', '') check(buffer != '') check(weechat.buffer_get_integer(buffer, 'type') == 0) @@ -181,6 +191,7 @@ def test_display(): check(buffer != '') weechat.prnt_y(buffer, 0, '## test print_y free buffer') weechat.prnt_y_date_tags(buffer, 0, 946681200, 'tag1,tag2', '## test print_y_date_tags free buffer') + weechat.prnt_y_date_tags(buffer, 1, 5680744830, 'tag1,tag2', '## test print_y_date_tags free buffer, year 2150') weechat.buffer_close(buffer) -- cgit v1.2.3