mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.0347: some tests fail on Solaris
Problem: Some tests fail on Solaris. Solution: Skip writefile test. Fix path to libc.so. Improve test for Turkish case change. (Libor Bukata, Bjorn Linse, closes #3403)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
" Tests for various functions.
|
" Tests for various functions.
|
||||||
|
source shared.vim
|
||||||
|
|
||||||
" Must be done first, since the alternate buffer must be unset.
|
" Must be done first, since the alternate buffer must be unset.
|
||||||
func Test_00_bufexists()
|
func Test_00_bufexists()
|
||||||
@@ -1006,6 +1007,17 @@ func Test_libcall_libcallnr()
|
|||||||
let libc = 'msvcrt.dll'
|
let libc = 'msvcrt.dll'
|
||||||
elseif has('mac')
|
elseif has('mac')
|
||||||
let libc = 'libSystem.B.dylib'
|
let libc = 'libSystem.B.dylib'
|
||||||
|
elseif system('uname -s') =~ 'SunOS'
|
||||||
|
" Set the path to libc.so according to the architecture.
|
||||||
|
let test_bits = system('file ' . GetVimProg())
|
||||||
|
let test_arch = system('uname -p')
|
||||||
|
if test_bits =~ '64-bit' && test_arch =~ 'sparc'
|
||||||
|
let libc = '/usr/lib/sparcv9/libc.so'
|
||||||
|
elseif test_bits =~ '64-bit' && test_arch =~ 'i386'
|
||||||
|
let libc = '/usr/lib/amd64/libc.so'
|
||||||
|
else
|
||||||
|
let libc = '/usr/lib/libc.so'
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
" On Unix, libc.so can be in various places.
|
" On Unix, libc.so can be in various places.
|
||||||
" Interestingly, using an empty string for the 1st argument of libcall
|
" Interestingly, using an empty string for the 1st argument of libcall
|
||||||
|
@@ -1630,12 +1630,13 @@ fun! Test_normal30_changecase()
|
|||||||
norm! V~
|
norm! V~
|
||||||
call assert_equal('THIS IS A simple test: äüöss', getline('.'))
|
call assert_equal('THIS IS A simple test: äüöss', getline('.'))
|
||||||
|
|
||||||
" Turkish ASCII turns to multi-byte. On Mac the Turkish locale is available
|
" Turkish ASCII turns to multi-byte. On some systems Turkish locale
|
||||||
" but toupper()/tolower() don't do the right thing.
|
" is available but toupper()/tolower() don't do the right thing.
|
||||||
if !has('mac') && !has('osx')
|
|
||||||
try
|
try
|
||||||
lang tr_TR.UTF-8
|
lang tr_TR.UTF-8
|
||||||
set casemap=
|
set casemap=
|
||||||
|
let iupper = toupper('i')
|
||||||
|
if iupper == "\u0130"
|
||||||
call setline(1, 'iI')
|
call setline(1, 'iI')
|
||||||
1normal gUU
|
1normal gUU
|
||||||
call assert_equal("\u0130I", getline(1))
|
call assert_equal("\u0130I", getline(1))
|
||||||
@@ -1645,7 +1646,19 @@ fun! Test_normal30_changecase()
|
|||||||
1normal guu
|
1normal guu
|
||||||
call assert_equal("i\u0131", getline(1))
|
call assert_equal("i\u0131", getline(1))
|
||||||
call assert_equal("i\u0131", tolower("iI"))
|
call assert_equal("i\u0131", tolower("iI"))
|
||||||
|
elseif iupper == "I"
|
||||||
|
call setline(1, 'iI')
|
||||||
|
1normal gUU
|
||||||
|
call assert_equal("II", getline(1))
|
||||||
|
call assert_equal("II", toupper("iI"))
|
||||||
|
|
||||||
|
call setline(1, 'iI')
|
||||||
|
1normal guu
|
||||||
|
call assert_equal("ii", getline(1))
|
||||||
|
call assert_equal("ii", tolower("iI"))
|
||||||
|
else
|
||||||
|
call assert_true(false, "expected toupper('i') to be either 'I' or '\u0130'")
|
||||||
|
endif
|
||||||
set casemap&
|
set casemap&
|
||||||
call setline(1, 'iI')
|
call setline(1, 'iI')
|
||||||
1normal gUU
|
1normal gUU
|
||||||
@@ -1662,7 +1675,6 @@ fun! Test_normal30_changecase()
|
|||||||
" can't use Turkish locale
|
" can't use Turkish locale
|
||||||
throw 'Skipped: Turkish locale not available'
|
throw 'Skipped: Turkish locale not available'
|
||||||
endtry
|
endtry
|
||||||
endif
|
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
bw!
|
bw!
|
||||||
|
@@ -33,7 +33,7 @@ func Test_writefile_fails_gently()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_writefile_fails_conversion()
|
func Test_writefile_fails_conversion()
|
||||||
if !has('multi_byte') || !has('iconv')
|
if !has('multi_byte') || !has('iconv') || system('uname -s') =~ 'SunOS'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
set nobackup nowritebackup
|
set nobackup nowritebackup
|
||||||
|
@@ -794,6 +794,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
347,
|
||||||
/**/
|
/**/
|
||||||
346,
|
346,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user