Mercurial > vim
annotate src/testdir/test_matchstrpos.vim @ 9467:5fb484647e12 v7.4.2014
commit https://github.com/vim/vim/commit/32b808a4bdf35b0dea63c735702a591e5869fecd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 9 21:57:20 2016 +0200
patch 7.4.2014
Problem: Using "noinsert" in 'completeopt' does not insert match.
Solution: Set compl_enter_selects. (Shougo, closes https://github.com/vim/vim/issues/875)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Jul 2016 22:00:07 +0200 |
parents | dda254280bab |
children |
rev | line source |
---|---|
8793
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test matchstrpos |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func Test_matchstrpos() |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing')) |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing', 2)) |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call assert_equal(['', -1, -1], matchstrpos('testing', 'ing', 5)) |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 call assert_equal(['ing', 1, 4, 7], matchstrpos(['vim', 'testing', 'execute'], 'ing')) |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call assert_equal(['', -1, -1, -1], matchstrpos(['vim', 'testing', 'execute'], 'img')) |
dda254280bab
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfunc |