Skip to content

Commit 9f4de1f

Browse files
committed
patch 8.0.0553: toupper/tolower test fails on Mac
Problem: Toupper/tolower test with Turkish locale fails on Mac. Solution: Skip the test on Mac.
1 parent 3317d5e commit 9f4de1f

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

src/testdir/test_normal.vim

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,25 +1603,28 @@ fun! Test_normal30_changecase()
16031603
norm! V~
16041604
call assert_equal('THIS IS A simple test: äüöss', getline('.'))
16051605

1606-
" Turkish ASCII turns to multi-byte.
1607-
try
1608-
lang tr_TR.UTF-8
1609-
set casemap=
1610-
call setline(1, 'iI')
1611-
1normal gUU
1612-
call assert_equal("\u0130I", getline(1))
1613-
call assert_equal("\u0130I", toupper("iI"))
1614-
1615-
call setline(1, 'iI')
1616-
1normal guu
1617-
call assert_equal("i\u0131", getline(1))
1618-
call assert_equal("i\u0131", tolower("iI"))
1619-
1620-
lang en_US.UTF-8
1621-
catch /E197:/
1622-
" can't use Turkish locale
1623-
throw 'Skipped: Turkish locale not available'
1624-
endtry
1606+
" Turkish ASCII turns to multi-byte. On Mac the Turkish locale is available
1607+
" but toupper()/tolower() don't do the right thing.
1608+
if !has('mac')
1609+
try
1610+
lang tr_TR.UTF-8
1611+
set casemap=
1612+
call setline(1, 'iI')
1613+
1normal gUU
1614+
call assert_equal("\u0130I", getline(1))
1615+
call assert_equal("\u0130I", toupper("iI"))
1616+
1617+
call setline(1, 'iI')
1618+
1normal guu
1619+
call assert_equal("i\u0131", getline(1))
1620+
call assert_equal("i\u0131", tolower("iI"))
1621+
1622+
lang en_US.UTF-8
1623+
catch /E197:/
1624+
" can't use Turkish locale
1625+
throw 'Skipped: Turkish locale not available'
1626+
endtry
1627+
endif
16251628

16261629
" clean up
16271630
bw!

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
553,
767769
/**/
768770
552,
769771
/**/

0 commit comments

Comments
 (0)