Patch 8.2.2286
Problem:    Sort test fails when locale is Canadian English. (Neil H Watson)
Solution:   Expect a different sort order. (closes #7609)
Files:      src/testdir/test_sort.vim


*** ../vim-8.2.2285/src/testdir/test_sort.vim   2020-12-18 19:49:52.349571840 
+0100
--- src/testdir/test_sort.vim   2021-01-03 16:16:23.732092714 +0100
***************
*** 24,37 ****
  
    " This does not appear to work correctly on Mac.
    if !has('mac')
!     " With the following locales, the accentuated letters are ordered
!     " similarly to the non-accentuated letters...
!     if v:collate =~? '^\(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 v:collate =~? '^sv.*utf-\?8$'
        call assert_equal(['a', 'A', 'o', 'O', 'p', 'P', 'ä', 'Ä', 'œ', 'œ', 
'ô', 'Ô'],
        \            sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 
'ô', 'Ô'], 'l'))
      endif
--- 24,41 ----
  
    " This does not appear to work correctly on Mac.
    if !has('mac')
!     if v:collate =~? '^en_ca.*\.utf-\?8$' && !has('mac')
!       " with Canadian English capitals come before lower case.
!       call assert_equal(['A', 'a', 'Ä', 'ä', 'O', 'o', 'Ô', 'ô', 'œ', 'œ', 
'P', 'p'],
!       \            sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 
'ô', 'Ô'], 'l'))
!     elseif v:collate =~? '^\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8$'
!       " With the following locales, the accentuated letters are ordered
!       " similarly to the non-accentuated letters...
        call assert_equal(['a', 'A', 'ä', 'Ä', 'o', 'O', 'ô', 'Ô', 'œ', 'œ', 
'p', 'P'],
        \            sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 
'ô', 'Ô'], 'l'))
      elseif v:collate =~? '^sv.*utf-\?8$'
+       " ... whereas with a Swedish locale, the accentuated letters are ordered
+       " after Z.
        call assert_equal(['a', 'A', 'o', 'O', 'p', 'P', 'ä', 'Ä', 'œ', 'œ', 
'ô', 'Ô'],
        \            sort(['A', 'a', 'o', 'O', 'œ', 'œ', 'p', 'P', 'Ä', 'ä', 
'ô', 'Ô'], 'l'))
      endif
***************
*** 1230,1285 ****
        \ },
        \ ]
  
!     " With the following locales, the accentuated letters are ordered
!     " similarly to the non-accentuated letters.
!     " This does not appear to work on Mac
!     if v:collate =~? '^\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8$' && !has('mac')
!       let tests += [
!       \ {
!       \    'name' : 'sort with locale',
!       \    'cmd' : '%sort l',
!       \    'input' : [
!       \       'A',
!       \       'E',
!       \       'O',
!       \       'À',
!       \       'È',
!       \       'É',
!       \       'Ô',
!       \       'Œ',
!       \       'Z',
!       \       'a',
!       \       'e',
!       \       'o',
!       \       'à',
!       \       'è',
!       \       'é',
!       \       'ô',
!       \       'œ',
!       \       'z'
!       \    ],
!       \    'expected' : [
!       \       'a',
!       \       'A',
!       \       'à',
!       \       'À',
!       \       'e',
!       \       'E',
!       \       'é',
!       \       'É',
!       \       'è',
!       \       'È',
!       \       'o',
!       \       'O',
!       \       'ô',
!       \       'Ô',
!       \       'œ',
!       \       'Œ',
!       \       'z',
!       \       'Z'
!       \    ]
!       \ },
!       \ ]
    endif
    if has('float')
      let tests += [
--- 1234,1339 ----
        \ },
        \ ]
  
!     " This does not appear to work correctly on Mac.
!     if !has('mac')
!       if v:collate =~? '^en_ca.*\.utf-\?8$'
!         " en_CA.utf-8 sorts capitals before lower case
!         let tests += [
!           \ {
!           \    'name' : 'sort with locale ' .. v:collate,
!           \    'cmd' : '%sort l',
!           \    'input' : [
!           \   'A',
!           \   'E',
!           \   'O',
!           \   'À',
!           \   'È',
!           \   'É',
!           \   'Ô',
!           \   'Œ',
!           \   'Z',
!           \   'a',
!           \   'e',
!           \   'o',
!           \   'à',
!           \   'è',
!           \   'é',
!           \   'ô',
!           \   'œ',
!           \   'z'
!           \    ],
!           \    'expected' : [
!           \   'A',
!           \   'a',
!           \   'À',
!           \   'à',
!           \   'E',
!           \   'e',
!           \   'É',
!           \   'é',
!           \   'È',
!           \   'è',
!           \   'O',
!           \   'o',
!           \   'Ô',
!           \   'ô',
!           \   'œ',
!           \   'Œ',
!           \   'Z',
!           \   'z'
!           \    ]
!           \ },
!           \ ]
!       elseif v:collate =~? '^\(en\|es\|de\|fr\|it\|nl\).*\.utf-\?8$'
!       " With these locales, the accentuated letters are ordered
!       " similarly to the non-accentuated letters.
!         let tests += [
!           \ {
!           \    'name' : 'sort with locale ' .. v:collate,
!           \    'cmd' : '%sort l',
!           \    'input' : [
!           \   'A',
!           \   'E',
!           \   'O',
!           \   'À',
!           \   'È',
!           \   'É',
!           \   'Ô',
!           \   'Œ',
!           \   'Z',
!           \   'a',
!           \   'e',
!           \   'o',
!           \   'à',
!           \   'è',
!           \   'é',
!           \   'ô',
!           \   'œ',
!           \   'z'
!           \    ],
!           \    'expected' : [
!           \   'a',
!           \   'A',
!           \   'à',
!           \   'À',
!           \   'e',
!           \   'E',
!           \   'é',
!           \   'É',
!           \   'è',
!           \   'È',
!           \   'o',
!           \   'O',
!           \   'ô',
!           \   'Ô',
!           \   'œ',
!           \   'Œ',
!           \   'z',
!           \   'Z'
!           \    ]
!           \ },
!           \ ]
!     endif
    endif
    if has('float')
      let tests += [
*** ../vim-8.2.2285/src/version.c       2021-01-03 15:55:05.764625605 +0100
--- src/version.c       2021-01-03 16:17:29.755899956 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2286,
  /**/

-- 
>From "know your smileys":
 =):-)  Uncle Sam

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202101031518.103FIiDL2154401%40masaka.moolenaar.net.

Raspunde prin e-mail lui