diff src/testdir/test_match.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 631344964949
children aef0f93d3eba
line wrap: on
line diff
--- a/src/testdir/test_match.vim
+++ b/src/testdir/test_match.vim
@@ -114,36 +114,33 @@ function Test_match()
   call assert_equal([{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}], getmatches())
   call clearmatches()
 
-  "
-  if has('multi_byte')
-    call setline(1, 'abcdΣabcdef')
-    call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]])
-    1
-    redraw!
-    let v1 = screenattr(1, 1)
-    let v4 = screenattr(1, 4)
-    let v5 = screenattr(1, 5)
-    let v6 = screenattr(1, 6)
-    let v7 = screenattr(1, 7)
-    let v8 = screenattr(1, 8)
-    let v9 = screenattr(1, 9)
-    let v10 = screenattr(1, 10)
-    call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}], getmatches())
-    call assert_notequal(v1, v4)
-    call assert_equal(v5, v4)
-    call assert_equal(v6, v1)
-    call assert_equal(v7, v1)
-    call assert_equal(v8, v4)
-    call assert_equal(v9, v4)
-    call assert_equal(v10, v1)
+  call setline(1, 'abcdΣabcdef')
+  call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]])
+  1
+  redraw!
+  let v1 = screenattr(1, 1)
+  let v4 = screenattr(1, 4)
+  let v5 = screenattr(1, 5)
+  let v6 = screenattr(1, 6)
+  let v7 = screenattr(1, 7)
+  let v8 = screenattr(1, 8)
+  let v9 = screenattr(1, 9)
+  let v10 = screenattr(1, 10)
+  call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}], getmatches())
+  call assert_notequal(v1, v4)
+  call assert_equal(v5, v4)
+  call assert_equal(v6, v1)
+  call assert_equal(v7, v1)
+  call assert_equal(v8, v4)
+  call assert_equal(v9, v4)
+  call assert_equal(v10, v1)
 
-    " Check, that setmatches() can correctly restore the matches from matchaddpos()
-    call matchadd('MyGroup1', '\%2lmatchadd')
-    let m=getmatches()
-    call clearmatches()
-    call setmatches(m)
-    call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1,9, 2]}, {'group': 'MyGroup1', 'pattern': '\%2lmatchadd', 'priority': 10, 'id': 12}], getmatches())
-  endif
+  " Check, that setmatches() can correctly restore the matches from matchaddpos()
+  call matchadd('MyGroup1', '\%2lmatchadd')
+  let m=getmatches()
+  call clearmatches()
+  call setmatches(m)
+  call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1,9, 2]}, {'group': 'MyGroup1', 'pattern': '\%2lmatchadd', 'priority': 10, 'id': 12}], getmatches())
 
   highlight MyGroup1 NONE
   highlight MyGroup2 NONE