Mercurial > vim
diff src/testdir/test_functions.vim @ 15607:2dcaa860e3fc v8.1.0811
patch 8.1.0811: too many #ifdefs
commit https://github.com/vim/vim/commit/30276f2beb248557c6b33cd5418bca8b7084b0a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 17:59:39 2019 +0100
patch 8.1.0811: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, the final chapter.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 18:00:07 +0100 |
parents | 67e3103d6e18 |
children | e649df212461 |
line wrap: on
line diff
--- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -106,11 +106,9 @@ func Test_strwidth() call assert_equal(4, strwidth(1234)) call assert_equal(5, strwidth(-1234)) - if has('multi_byte') - call assert_equal(2, strwidth('😉')) - call assert_equal(17, strwidth('Eĥoŝanĝo ĉiuĵaŭde')) - call assert_equal((aw == 'single') ? 6 : 7, strwidth('Straße')) - endif + call assert_equal(2, strwidth('😉')) + call assert_equal(17, strwidth('Eĥoŝanĝo ĉiuĵaŭde')) + call assert_equal((aw == 'single') ? 6 : 7, strwidth('Straße')) call assert_fails('call strwidth({->0})', 'E729:') call assert_fails('call strwidth([])', 'E730:') @@ -277,10 +275,8 @@ func Test_strpart() call assert_equal('fg', strpart('abcdefg', 5, 4)) call assert_equal('defg', strpart('abcdefg', 3)) - if has('multi_byte') - call assert_equal('lép', strpart('éléphant', 2, 4)) - call assert_equal('léphant', strpart('éléphant', 2)) - endif + call assert_equal('lép', strpart('éléphant', 2, 4)) + call assert_equal('léphant', strpart('éléphant', 2)) endfunc func Test_tolower() @@ -290,10 +286,6 @@ func Test_tolower() call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~', \ tolower(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~')) - if !has('multi_byte') - return - endif - " Test with a few uppercase diacritics. call assert_equal("aàáâãäåāăąǎǟǡả", tolower("AÀÁÂÃÄÅĀĂĄǍǞǠẢ")) call assert_equal("bḃḇ", tolower("BḂḆ")) @@ -368,10 +360,6 @@ func Test_toupper() call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~', \ toupper(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~')) - if !has('multi_byte') - return - endif - " Test with a few lowercase diacritics. call assert_equal("AÀÁÂÃÄÅĀĂĄǍǞǠẢ", toupper("aàáâãäåāăąǎǟǡả")) call assert_equal("BḂḆ", toupper("bḃḇ"))