summaryrefslogtreecommitdiff
path: root/src/testdir/test_syntax.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_syntax.vim')
-rw-r--r--src/testdir/test_syntax.vim12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index 589470b68..93e56d798 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -838,8 +838,9 @@ func Test_search_syntax_skip()
1
call search('VIM', 'w', '', 0, 'synIDattr(synID(line("."), col("."), 1), "name") =~? "comment"')
call assert_equal('Another Text for VIM', getline('.'))
+
1
- call search('VIM', 'w', '', 0, 'synIDattr(synID(line("."), col("."), 1), "name") !~? "string"')
+ call search('VIM', 'cw', '', 0, 'synIDattr(synID(line("."), col("."), 1), "name") !~? "string"')
call assert_equal(' let a = "VIM"', getline('.'))
" Skip argument using Lambda.
@@ -848,26 +849,27 @@ func Test_search_syntax_skip()
call assert_equal('Another Text for VIM', getline('.'))
1
- call search('VIM', 'w', '', 0, { -> synIDattr(synID(line("."), col("."), 1), "name") !~? "string"})
+ call search('VIM', 'cw', '', 0, { -> synIDattr(synID(line("."), col("."), 1), "name") !~? "string"})
call assert_equal(' let a = "VIM"', getline('.'))
" Skip argument using funcref.
func InComment()
return synIDattr(synID(line("."), col("."), 1), "name") =~? "comment"
endfunc
- func InString()
+ func NotInString()
return synIDattr(synID(line("."), col("."), 1), "name") !~? "string"
endfunc
+
1
call search('VIM', 'w', '', 0, function('InComment'))
call assert_equal('Another Text for VIM', getline('.'))
1
- call search('VIM', 'w', '', 0, function('InString'))
+ call search('VIM', 'cw', '', 0, function('NotInString'))
call assert_equal(' let a = "VIM"', getline('.'))
delfunc InComment
- delfunc InString
+ delfunc NotInString
bwipe!
endfunc