diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-04-10 15:23:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-10 15:23:44 +0200 |
| commit | fec53f0bdf5b871c1f6ca818d5a5c52118f5c266 (patch) | |
| tree | fe6f9dc4ba3788fe6fea8ac599974904861257c3 /src/nvim/testdir/test_normal.vim | |
| parent | dd7f41e5a04c14255893e8b986e42e4c62902e1b (diff) | |
| parent | c1cf03398143f4dc0ac9155988edad349d24deca (diff) | |
| download | rneovim-fec53f0bdf5b871c1f6ca818d5a5c52118f5c266.tar.gz rneovim-fec53f0bdf5b871c1f6ca818d5a5c52118f5c266.tar.bz2 rneovim-fec53f0bdf5b871c1f6ca818d5a5c52118f5c266.zip | |
Merge #6479 from bfredl/tolower
remove vim_tolower/etc functions with broken locale-dependent behavior
Diffstat (limited to 'src/nvim/testdir/test_normal.vim')
| -rw-r--r-- | src/nvim/testdir/test_normal.vim | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index a22dca35cc..c529971528 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -1606,6 +1606,40 @@ fun! Test_normal30_changecase() norm! V~ call assert_equal('THIS IS A simple test: äüöss', getline('.')) + " 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') && !has('osx') + 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")) + + set casemap& + 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")) + + lang en_US.UTF-8 + catch /E197:/ + " can't use Turkish locale + throw 'Skipped: Turkish locale not available' + endtry + endif + " clean up bw! endfunc |