diff options
Diffstat (limited to 'src/nvim/testdir/test_normal.vim')
-rw-r--r-- | src/nvim/testdir/test_normal.vim | 63 |
1 files changed, 18 insertions, 45 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index 945cd5a617..532beb9c39 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -1374,10 +1374,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äüö') @@ -1628,10 +1624,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 @@ -1901,42 +1893,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') @@ -1955,9 +1941,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. @@ -2298,11 +2281,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 @@ -2475,9 +2453,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>" @@ -2541,9 +2517,6 @@ func Test_changelist() endfunc func Test_delete_until_paragraph() - if !has('multi_byte') - return - endif new normal grádv} call assert_equal('á', getline(1)) |