diff src/testdir/test_normal.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 1fd8e32532f7
children 4411c38f3d16
line wrap: on
line diff
--- 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))