comparison src/testdir/test63.in @ 6134:4c25af735304 v7.4.405

updated for version 7.4.405 Problem: Screen updating is slow when using matches. Solution: Do not use the ">=" as in patch 7.4.362, check the lnum.
author Bram Moolenaar <bram@vim.org>
date Sat, 16 Aug 2014 16:28:36 +0200
parents 5a5492d676ab
children d51d47bd77c2
comparison
equal deleted inserted replaced
6133:18fd959b07ef 6134:4c25af735304
1 Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()", 1 Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
2 "matchadd()", "matchaddpos", "matcharg()", "matchdelete()", and "setmatches()". 2 "matchadd()", "matchaddpos", "matcharg()", "matchdelete()", and "setmatches()".
3 3
4 STARTTEST 4 STARTTEST
5 :so small.vim 5 :so small.vim
6 :set encoding=utf8
6 :" --- Check that "matcharg()" returns the correct group and pattern if a match 7 :" --- Check that "matcharg()" returns the correct group and pattern if a match
7 :" --- is defined. 8 :" --- is defined.
8 :let @r = "*** Test 1: " 9 :let @r = "*** Test 1: "
9 :highlight MyGroup1 ctermbg=red guibg=red 10 :highlight MyGroup1 ctermbg=red guibg=red
10 :highlight MyGroup2 ctermbg=green guibg=green 11 :highlight MyGroup2 ctermbg=green guibg=green
162 :let v11 = screenattr(1, 11) 163 :let v11 = screenattr(1, 11)
163 :let @r .= string(getmatches())."\n" 164 :let @r .= string(getmatches())."\n"
164 :if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1 165 :if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1
165 : let @r .= "OK\n" 166 : let @r .= "OK\n"
166 :else 167 :else
167 : let @r .= "FAILED\n" 168 : let @r .= "FAILED: " . v5 . "/" . v6 . "/" . v8 . "/" . v10 . "/" . v11 . "\n"
169 :endif
170 :call clearmatches()
171 :"
172 :call setline(1, 'abcdΣabcdef')
173 :call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]])
174 :1
175 :redraw!
176 :let v1 = screenattr(1, 1)
177 :let v4 = screenattr(1, 4)
178 :let v5 = screenattr(1, 5)
179 :let v6 = screenattr(1, 6)
180 :let v7 = screenattr(1, 7)
181 :let v8 = screenattr(1, 8)
182 :let v9 = screenattr(1, 9)
183 :let v10 = screenattr(1, 10)
184 :let @r .= string(getmatches())."\n"
185 :if v1 != v4 && v5 == v4 && v6 == v1 && v7 == v1 && v8 == v4 && v9 == v4 && v10 == v1
186 : let @r .= "OK\n"
187 :else
188 : let @r .= "FAILED: " . v4 . "/" . v5 . "/" . v6 . "/" . v7 . "/" . v8 . "/" . v9 . "/" . v10 . "\n"
168 :endif 189 :endif
169 :call clearmatches() 190 :call clearmatches()
170 G"rp 191 G"rp
171 :/^Results/,$wq! test.out 192 :/^Results/,$wq! test.out
172 ENDTEST 193 ENDTEST