]> granicus.if.org Git - vim/commitdiff
patch 8.0.0553: toupper/tolower test fails on Mac v8.0.0553
authorBram Moolenaar <Bram@vim.org>
Sat, 8 Apr 2017 17:39:43 +0000 (19:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 8 Apr 2017 17:39:43 +0000 (19:39 +0200)
Problem:    Toupper/tolower test with Turkish locale fails on Mac.
Solution:   Skip the test on Mac.

src/testdir/test_normal.vim
src/version.c

index 149afa918a3d08c94bf1ed98cc65d9f572ba53f5..aa82992a7b4fb17da6811d047e456194f0ff91c9 100644 (file)
@@ -1603,25 +1603,28 @@ fun! Test_normal30_changecase()
   norm! V~
   call assert_equal('THIS IS A simple test: äüöss', getline('.'))
 
-  " Turkish ASCII turns to multi-byte.
-  try
-    lang tr_TR.UTF-8
-    set casemap=
-    call setline(1, 'iI')
-    1normal gUU
-    call assert_equal("\u0130I", getline(1))
-    call assert_equal("\u0130I", toupper("iI"))
-
-    call setline(1, 'iI')
-    1normal guu
-    call assert_equal("i\u0131", getline(1))
-    call assert_equal("i\u0131", tolower("iI"))
-
-    lang en_US.UTF-8
-  catch /E197:/
-    " can't use Turkish locale
-    throw 'Skipped: Turkish locale not available'
-  endtry
+  " Turkish ASCII turns to multi-byte.  On Mac the Turkish locale is available
+  " but toupper()/tolower() don't do the right thing.
+  if !has('mac')
+    try
+      lang tr_TR.UTF-8
+      set casemap=
+      call setline(1, 'iI')
+      1normal gUU
+      call assert_equal("\u0130I", getline(1))
+      call assert_equal("\u0130I", toupper("iI"))
+
+      call setline(1, 'iI')
+      1normal guu
+      call assert_equal("i\u0131", getline(1))
+      call assert_equal("i\u0131", tolower("iI"))
+
+      lang en_US.UTF-8
+    catch /E197:/
+      " can't use Turkish locale
+      throw 'Skipped: Turkish locale not available'
+    endtry
+  endif
 
   " clean up
   bw!
index e37178b8a115413d37a5f2e6db0e5f4502f0f937..9fb32c945353d75b17749a4366f7740b8b1edb95 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    553,
 /**/
     552,
 /**/