To: vim_dev@googlegroups.com Subject: Patch 8.2.1935 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1935 (after 8.2.1933) Problem: Sort test fails on Mac. Solution: Disable the sort test with locale on Mac. Files: src/testdir/test_sort.vim *** ../vim-8.2.1934/src/testdir/test_sort.vim 2020-11-01 13:57:37.551988657 +0100 --- src/testdir/test_sort.vim 2020-11-01 17:14:44.433995398 +0100 *************** *** 22,38 **** call assert_equal(['A', 'a', 'o', 'O', 'p', 'P', 'Ä', 'Ô', 'ä', 'ô', 'œ', 'œ'], \ sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 'ô', 'Ô'], 'i')) ! let lc = execute('language collate') ! " With the following locales, the accentuated letters are ordered ! " similarly to the non-accentuated letters... ! if lc =~? '"\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8"' ! call assert_equal(['a', 'A', 'ä', 'Ä', 'o', 'O', 'ô', 'Ô', 'œ', 'œ', 'p', 'P'], ! \ sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 'ô', 'Ô'], 'l')) ! " ... whereas with a Swedish locale, the accentuated letters are ordered ! " after Z. ! elseif lc =~? '"sv.*utf-\?8"' ! call assert_equal(['a', 'A', 'o', 'O', 'p', 'P', 'ä', 'Ä', 'œ', 'œ', 'ô', 'Ô'], ! \ sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 'ô', 'Ô'], 'l')) endif endfunc --- 22,41 ---- call assert_equal(['A', 'a', 'o', 'O', 'p', 'P', 'Ä', 'Ô', 'ä', 'ô', 'œ', 'œ'], \ sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 'ô', 'Ô'], 'i')) ! " This does not appear to work correctly on Mac. ! if !has('mac') ! let lc = execute('language collate') ! " With the following locales, the accentuated letters are ordered ! " similarly to the non-accentuated letters... ! if lc =~? '"\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8"' ! call assert_equal(['a', 'A', 'ä', 'Ä', 'o', 'O', 'ô', 'Ô', 'œ', 'œ', 'p', 'P'], ! \ sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 'ô', 'Ô'], 'l')) ! " ... whereas with a Swedish locale, the accentuated letters are ordered ! " after Z. ! elseif lc =~? '"sv.*utf-\?8"' ! call assert_equal(['a', 'A', 'o', 'O', 'p', 'P', 'ä', 'Ä', 'œ', 'œ', 'ô', 'Ô'], ! \ sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 'ô', 'Ô'], 'l')) ! endif endif endfunc *************** *** 1224,1232 **** \ ] " With the following locales, the accentuated letters are ordered ! " similarly to the non-accentuated letters... let lc = execute('language collate') ! if lc =~? '"\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8"' let tests += [ \ { \ 'name' : 'sort with locale', --- 1227,1236 ---- \ ] " With the following locales, the accentuated letters are ordered ! " similarly to the non-accentuated letters. ! " This does not appear to work on Mac let lc = execute('language collate') ! if lc =~? '"\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8"' && !has('mac') let tests += [ \ { \ 'name' : 'sort with locale', *** ../vim-8.2.1934/src/version.c 2020-11-01 17:03:34.215513804 +0100 --- src/version.c 2020-11-01 17:15:33.905874879 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1935, /**/ -- hundred-and-one symptoms of being an internet addict: 174. You know what a listserv is. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///