comparison src/testdir/test_normal.vim @ 11335:bc8e3fd275be v8.0.0553

patch 8.0.0553: toupper/tolower test fails on Mac commit https://github.com/vim/vim/commit/9f4de1f5435b900e43e19766da1a5bed4686cf44 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 8 19:39:43 2017 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 08 Apr 2017 19:45:04 +0200
parents fef09eb74832
children f0fbebf19b80
comparison
equal deleted inserted replaced
11334:43714bba720b 11335:bc8e3fd275be
1601 norm! 010~ 1601 norm! 010~
1602 call assert_equal('this is a SIMPLE TEST: ÄÜÖSS', getline('.')) 1602 call assert_equal('this is a SIMPLE TEST: ÄÜÖSS', getline('.'))
1603 norm! V~ 1603 norm! V~
1604 call assert_equal('THIS IS A simple test: äüöss', getline('.')) 1604 call assert_equal('THIS IS A simple test: äüöss', getline('.'))
1605 1605
1606 " Turkish ASCII turns to multi-byte. 1606 " Turkish ASCII turns to multi-byte. On Mac the Turkish locale is available
1607 try 1607 " but toupper()/tolower() don't do the right thing.
1608 lang tr_TR.UTF-8 1608 if !has('mac')
1609 set casemap= 1609 try
1610 call setline(1, 'iI') 1610 lang tr_TR.UTF-8
1611 1normal gUU 1611 set casemap=
1612 call assert_equal("\u0130I", getline(1)) 1612 call setline(1, 'iI')
1613 call assert_equal("\u0130I", toupper("iI")) 1613 1normal gUU
1614 1614 call assert_equal("\u0130I", getline(1))
1615 call setline(1, 'iI') 1615 call assert_equal("\u0130I", toupper("iI"))
1616 1normal guu 1616
1617 call assert_equal("i\u0131", getline(1)) 1617 call setline(1, 'iI')
1618 call assert_equal("i\u0131", tolower("iI")) 1618 1normal guu
1619 1619 call assert_equal("i\u0131", getline(1))
1620 lang en_US.UTF-8 1620 call assert_equal("i\u0131", tolower("iI"))
1621 catch /E197:/ 1621
1622 " can't use Turkish locale 1622 lang en_US.UTF-8
1623 throw 'Skipped: Turkish locale not available' 1623 catch /E197:/
1624 endtry 1624 " can't use Turkish locale
1625 throw 'Skipped: Turkish locale not available'
1626 endtry
1627 endif
1625 1628
1626 " clean up 1629 " clean up
1627 bw! 1630 bw!
1628 endfunc 1631 endfunc
1629 1632