diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-24 17:59:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-24 17:59:39 +0100 |
commit | 30276f2beb248557c6b33cd5418bca8b7084b0a5 (patch) | |
tree | 56f7b88712a5ffffdd10681983e70501e2e1ba58 /src/testdir/test_normal.vim | |
parent | 264b74fa545edfb92c0d7d08a02c26331cc5b168 (diff) | |
download | vim-git-30276f2beb248557c6b33cd5418bca8b7084b0a5.tar.gz |
patch 8.1.0811: too many #ifdefsv8.1.0811
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, the final chapter.
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r-- | src/testdir/test_normal.vim | 63 |
1 files changed, 18 insertions, 45 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim index aac75da71..1224a3f7d 100644 --- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -1368,10 +1368,6 @@ func Test_normal23_K() endfunc func Test_normal24_rot13() - " This test uses multi byte characters - if !has("multi_byte") - return - endif " Testing for g?? g?g? new call append(0, 'abcdefghijklmnopqrstuvwxyzäüö') @@ -1621,10 +1617,6 @@ fun! Test_normal29_brace() endfunc fun! Test_normal30_changecase() - " This test uses multi byte characters - if !has("multi_byte") - return - endif new call append(0, 'This is a simple test: äüöß') norm! 1ggVu @@ -1894,42 +1886,36 @@ func Test_g_ctrl_g() call assert_equal("\nCol 1 of 10; Line 1 of 2; Word 1 of 4; Char 1 of 23; Byte 1 of 22", a) set bin & eol& - if has('multi_byte') - call setline(1, ['Français', '日本語']) + call setline(1, ['Français', '日本語']) - let a = execute(":norm! \<Esc>gojlg\<c-g>") - call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20", a) + let a = execute(":norm! \<Esc>gojlg\<c-g>") + call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20", a) - let a = execute(":norm! \<Esc>gojvlg\<c-g>") - call assert_equal("\nSelected 1 of 2 Lines; 1 of 2 Words; 2 of 13 Chars; 6 of 20 Bytes", a) + let a = execute(":norm! \<Esc>gojvlg\<c-g>") + call assert_equal("\nSelected 1 of 2 Lines; 1 of 2 Words; 2 of 13 Chars; 6 of 20 Bytes", a) - let a = execute(":norm! \<Esc>goll\<c-v>jlg\<c-g>") - call assert_equal("\nSelected 4 Cols; 2 of 2 Lines; 2 of 2 Words; 6 of 13 Chars; 11 of 20 Bytes", a) + let a = execute(":norm! \<Esc>goll\<c-v>jlg\<c-g>") + call assert_equal("\nSelected 4 Cols; 2 of 2 Lines; 2 of 2 Words; 6 of 13 Chars; 11 of 20 Bytes", a) - set fenc=utf8 bomb - let a = execute(":norm! \<Esc>gojlg\<c-g>") - call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+3 for BOM)", a) + set fenc=utf8 bomb + let a = execute(":norm! \<Esc>gojlg\<c-g>") + call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+3 for BOM)", a) - set fenc=utf16 bomb - let a = execute(":norm! g\<c-g>") - call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+2 for BOM)", a) + set fenc=utf16 bomb + let a = execute(":norm! g\<c-g>") + call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+2 for BOM)", a) - set fenc=utf32 bomb - let a = execute(":norm! g\<c-g>") - call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+4 for BOM)", a) + set fenc=utf32 bomb + let a = execute(":norm! g\<c-g>") + call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+4 for BOM)", a) - set fenc& bomb& - endif + set fenc& bomb& set ff& bwipe! endfunc fun! Test_normal34_g_cmd3() - if !has("multi_byte") - return - endif - " Test for g8 new let a=execute(':norm! 1G0g8') @@ -1948,9 +1934,6 @@ fun! Test_normal34_g_cmd3() endfunc func Test_normal_8g8() - if !has("multi_byte") - return - endif new " Test 8g8 which finds invalid utf8 at or after the cursor. @@ -2290,11 +2273,6 @@ func Test_normal45_drop() endfunc func Test_normal46_ignore() - " This test uses multi byte characters - if !has("multi_byte") - return - endif - new " How to test this? " let's just for now test, that the buffer @@ -2470,9 +2448,7 @@ func Test_normal54_Ctrl_bsl() call assert_equal(['abcdefghijklmn'], getline(1,'$')) exe "norm! df\<c-\>m" call assert_equal(['abcdefghijklmn'], getline(1,'$')) - if !has("multi_byte") - return - endif + call setline(2, 'abcdefghijklmnāf') norm! 2gg0 exe "norm! df\<Char-0x101>" @@ -2494,9 +2470,6 @@ func Test_normal_large_count() endfunc func Test_delete_until_paragraph() - if !has('multi_byte') - return - endif new normal grádv} call assert_equal('á', getline(1)) |