diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2017-04-10 19:48:45 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2017-04-11 10:24:19 +0200 |
commit | 69775f603f0b21cb28adec99daaaa9356581ddd0 (patch) | |
tree | bba70e78f90672181ed33245450488bfee942ba9 /test/functional/normal/lang_spec.lua | |
parent | 337299c8082347feecb5e733bed993c6a5933456 (diff) | |
download | rneovim-69775f603f0b21cb28adec99daaaa9356581ddd0.tar.gz rneovim-69775f603f0b21cb28adec99daaaa9356581ddd0.tar.bz2 rneovim-69775f603f0b21cb28adec99daaaa9356581ddd0.zip |
ci: install Turkish locale and make locale tests more reliable
Diffstat (limited to 'test/functional/normal/lang_spec.lua')
-rw-r--r-- | test/functional/normal/lang_spec.lua | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/test/functional/normal/lang_spec.lua b/test/functional/normal/lang_spec.lua index 1da1d4679d..24d1262f5f 100644 --- a/test/functional/normal/lang_spec.lua +++ b/test/functional/normal/lang_spec.lua @@ -17,13 +17,7 @@ describe('gu and gU', function() end) describe('works in Turkish locale', function() - if helpers.pending_win32(pending) then return end - clear() - if eval('has("mac")') ~= 0 then - pending("not yet on macOS", function() end) - return - end local err = exc_exec('lang ctype tr_TR.UTF-8') if err ~= 0 then @@ -47,13 +41,23 @@ describe('gu and gU', function() it('with casemap=""', function() command('set casemap=') - -- expect Turkish locale behavior - insert("iI") - feed("VgU") - expect("İI") - feed("Vgu") - expect("iı") + -- expect either Turkish locale behavior or ASCII behavior + local iupper = eval("toupper('i')") + if iupper == "İ" then + insert("iI") + feed("VgU") + expect("İI") + feed("Vgu") + expect("iı") + elseif iupper == "I" then + insert("iI") + feed("VgU") + expect("II") + feed("Vgu") + expect("ii") + else + error("expected toupper('i') to be either 'I' or 'İ'") + end end) - end) end) |