From c713a0e4759726dbfaec14d88246fbb2a8e924be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 25 Mar 2019 00:18:55 +0100 Subject: [PATCH] tests: fix scripting API tests on 32-bit arch The problem is that on 32-bit arch (like GNU/Hurd), the number 42000000000000 is converted to 42000000000000L in Python, which is causing troubles in other languages like Perl. The fix is to use a smaller number. Such large size for function string_format_size is tested in the C++ test suite anyway. --- tests/scripts/python/testapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index 036d0bb92..c4fdab5b9 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -70,7 +70,7 @@ def test_strings(): check(weechat.string_format_size(0) == '0 bytes') check(weechat.string_format_size(1) == '1 byte') check(weechat.string_format_size(2097152) == '2.10 MB') - check(weechat.string_format_size(42000000000000) == '42.00 TB') + check(weechat.string_format_size(420000000) == '420.00 MB') check(weechat.string_remove_color('test', '?') == 'test') check(weechat.string_is_command_char('/test') == 1) check(weechat.string_is_command_char('test') == 0)