aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-21 13:11:10 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-22 18:42:58 +0100
commit929859ed8156a45f5acb491d82f8c06ef5f57902 (patch)
tree5dc61454f6b29002ff2937f54aefe3c094e53793 /src/nvim/testdir
parent53ccd07fa1c0bfcb79ca11bd873ea12f4dc12f4a (diff)
downloadrneovim-929859ed8156a45f5acb491d82f8c06ef5f57902.tar.gz
rneovim-929859ed8156a45f5acb491d82f8c06ef5f57902.tar.bz2
rneovim-929859ed8156a45f5acb491d82f8c06ef5f57902.zip
vim-patch:7.4.2355
Problem: Regexp fails to match when using "\>\)\?". (Ramel) Solution: When a state is already in the list, but addstate_here() is used and the existing state comes later, add the new state anyway. https://github.com/vim/vim/commit/16b3578f355282846f2600ce77fb344950f0b9ce
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_regexp_utf8.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim
index 9e9a3de500..7f3b31575d 100644
--- a/src/nvim/testdir/test_regexp_utf8.vim
+++ b/src/nvim/testdir/test_regexp_utf8.vim
@@ -97,3 +97,12 @@ func Test_recursive_substitute()
call setwinvar(1, 'myvar', 1)
bwipe!
endfunc
+
+func Test_eow_with_optional()
+ let expected = ['abc def', 'abc', 'def', '', '', '', '', '', '', '']
+ for re in range(0, 2)
+ exe 'set re=' . re
+ let actual = matchlist('abc def', '\(abc\>\)\?\s*\(def\)')
+ call assert_equal(expected, actual)
+ endfor
+endfunc