mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Add test cases for #10
This commit is contained in:
32
test/issues/10/legacy.vim
Normal file
32
test/issues/10/legacy.vim
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
if "(foo)"
|
||||
|
||||
let x = "(foo)"
|
||||
|
||||
endif
|
||||
|
||||
( )
|
||||
|
||||
let x = ( "( )" )
|
||||
|
||||
let y = "("
|
||||
\ . ")"
|
||||
|
||||
"("
|
||||
)
|
||||
\ . ")"
|
||||
|
||||
let z = ( '( ' ) . ' )'
|
||||
|
||||
let a = " if endif "
|
||||
*cpo-M*
|
||||
M When excluded, "%" matching will take backslashes into
|
||||
account. Thus in "( \( )" and "\( ( \)" the outer
|
||||
parenthesis match. When included "%" ignores
|
||||
backslashes, which is Vi compatible.
|
||||
|
||||
let b = '\( \)'
|
||||
let c = "\\( \\)"
|
||||
|
||||
let d = "( \\( )" . "\\( " . '\( \)' . "\\)"
|
||||
|
||||
8
test/issues/10/string.vim
Normal file
8
test/issues/10/string.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
function String()
|
||||
|
||||
let output = filter(list, "matchstr(v:val, '^\s*\zsfoo\ze\\(bar\\|baz\\)')")
|
||||
let output = filter(list, 'matchstr(v:val, ''^\s*\zsfoo\ze\(bar\|baz\)'')')
|
||||
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user