diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-04-20 00:52:22 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-04-20 10:12:09 +0100 |
commit | a83292685bc582744804a14f4fcb417502f40707 (patch) | |
tree | 86901ee76049f9e38de83ba19903099792861e0e | |
parent | 6a0b8cbd81f81957a415cf03415bf2bffc18b56e (diff) | |
download | rneovim-a83292685bc582744804a14f4fcb417502f40707.tar.gz rneovim-a83292685bc582744804a14f4fcb417502f40707.tar.bz2 rneovim-a83292685bc582744804a14f4fcb417502f40707.zip |
vim-patch:8.2.1935: sort test fails on Mac
Problem: Sort test fails on Mac.
Solution: Disable the sort test with locale on Mac.
https://github.com/vim/vim/commit/578f4cc7d0ce67101832b25cf77246fcd630e3c0
-rw-r--r-- | src/nvim/testdir/test_sort.vim | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/nvim/testdir/test_sort.vim b/src/nvim/testdir/test_sort.vim index 278cbef01e..e4584a8eb7 100644 --- a/src/nvim/testdir/test_sort.vim +++ b/src/nvim/testdir/test_sort.vim @@ -20,17 +20,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 @@ -1243,9 +1246,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', |