diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-01 17:19:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-01 17:19:07 +0100 |
commit | 578f4cc7d0ce67101832b25cf77246fcd630e3c0 (patch) | |
tree | 97c28ef1e82c37fca2034cfe786129a4d26d609d /src | |
parent | e88c8e802cf5ee59a2a6649a5b46c9e80de823ad (diff) | |
download | vim-git-578f4cc7d0ce67101832b25cf77246fcd630e3c0.tar.gz |
patch 8.2.1935: sort test fails on Macv8.2.1935
Problem: Sort test fails on Mac.
Solution: Disable the sort test with locale on Mac.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_sort.vim | 30 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/testdir/test_sort.vim b/src/testdir/test_sort.vim index 93190a940..244678ea9 100644 --- a/src/testdir/test_sort.vim +++ b/src/testdir/test_sort.vim @@ -22,17 +22,20 @@ func Test_sort_strings() 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')) + " 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,9 +1227,10 @@ func Test_sort_cmd() \ ] " With the following locales, the accentuated letters are ordered - " similarly to the non-accentuated letters... + " 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"' + if lc =~? '"\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8"' && !has('mac') let tests += [ \ { \ 'name' : 'sort with locale', diff --git a/src/version.c b/src/version.c index a0c3857b8..ed74a497f 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1935, +/**/ 1934, /**/ 1933, |