diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-13 19:07:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 19:07:42 +0800 |
commit | c8c7912a4deed6351e77b42d42742d675f5d45c6 (patch) | |
tree | 2eb8e39c56c6dc93cf44645ffea4ab851450fb18 | |
parent | 231e1988ed788caa6b15817c63e94f38cd8ac75c (diff) | |
download | rneovim-c8c7912a4deed6351e77b42d42742d675f5d45c6.tar.gz rneovim-c8c7912a4deed6351e77b42d42742d675f5d45c6.tar.bz2 rneovim-c8c7912a4deed6351e77b42d42742d675f5d45c6.zip |
build(vim-patch.sh): ignore test_behave.vim (#23062)
-rwxr-xr-x | scripts/vim-patch.sh | 2 | ||||
-rw-r--r-- | test/old/testdir/test_cmdline.vim | 25 | ||||
-rw-r--r-- | test/old/testdir/test_usercommands.vim | 5 | ||||
-rw-r--r-- | test/old/testdir/test_visual.vim | 2 |
4 files changed, 33 insertions, 1 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 20e337afcb..385005a442 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -212,7 +212,7 @@ preprocess_patch() { 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$
' +w +q "$file" # Remove testdir/test_*.vim files - local na_src_testdir='balloon.*\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' + local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<test_\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$
' +w +q "$file" # Remove version.c #7555 diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index 37c284064e..74dd7bf3c4 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -453,6 +453,11 @@ func Test_getcompletion() let l = getcompletion('blahblah', 'augroup') call assert_equal([], l) + " let l = getcompletion('', 'behave') + " call assert_true(index(l, 'mswin') >= 0) + " let l = getcompletion('not', 'behave') + " call assert_equal([], l) + let l = getcompletion('', 'color') call assert_true(index(l, 'default') >= 0) let l = getcompletion('dirty', 'color') @@ -2763,6 +2768,26 @@ func Test_fuzzy_completion_bufname_fullpath() set wildoptions& endfunc +" :behave suboptions fuzzy completion +func Test_fuzzy_completion_behave() + throw 'Skipped: Nvim removed :behave' + set wildoptions& + call feedkeys(":behave xm\<Tab>\<C-B>\"\<CR>", 'tx') + call assert_equal('"behave xm', @:) + call feedkeys(":behave xt*m\<Tab>\<C-B>\"\<CR>", 'tx') + call assert_equal('"behave xterm', @:) + set wildoptions=fuzzy + call feedkeys(":behave xm\<Tab>\<C-B>\"\<CR>", 'tx') + call assert_equal('"behave xterm', @:) + call feedkeys(":behave xt*m\<Tab>\<C-B>\"\<CR>", 'tx') + call assert_equal('"behave xt*m', @:) + let g:Sline = '' + call feedkeys(":behave win\<C-D>\<F4>\<C-B>\"\<CR>", 'tx') + call assert_equal('mswin', g:Sline) + call assert_equal('"behave win', @:) + set wildoptions& +endfunc + " " colorscheme name fuzzy completion - NOT supported " func Test_fuzzy_completion_colorscheme() " endfunc diff --git a/test/old/testdir/test_usercommands.vim b/test/old/testdir/test_usercommands.vim index ac37094b1b..e22f57b6f1 100644 --- a/test/old/testdir/test_usercommands.vim +++ b/test/old/testdir/test_usercommands.vim @@ -303,6 +303,7 @@ func Test_CmdErrors() call assert_fails('com! -complete=xxx DoCmd :', 'E180:') call assert_fails('com! -complete=custom DoCmd :', 'E467:') call assert_fails('com! -complete=customlist DoCmd :', 'E467:') + " call assert_fails('com! -complete=behave,CustomComplete DoCmd :', 'E468:') call assert_fails('com! -complete=file DoCmd :', 'E1208:') call assert_fails('com! -nargs=0 -complete=file DoCmd :', 'E1208:') call assert_fails('com! -nargs=x DoCmd :', 'E176:') @@ -390,6 +391,10 @@ func Test_CmdCompletion() call feedkeys(":com DoC\<C-A>\<C-B>\"\<CR>", 'tx') call assert_equal('"com DoC', @:) + " com! -nargs=1 -complete=behave DoCmd : + " call feedkeys(":DoCmd \<C-A>\<C-B>\"\<CR>", 'tx') + " call assert_equal('"DoCmd mswin xterm', @:) + " Test for file name completion com! -nargs=1 -complete=file DoCmd : call feedkeys(":DoCmd READM\<Tab>\<C-B>\"\<CR>", 'tx') diff --git a/test/old/testdir/test_visual.vim b/test/old/testdir/test_visual.vim index 75487f8402..d10a946200 100644 --- a/test/old/testdir/test_visual.vim +++ b/test/old/testdir/test_visual.vim @@ -485,6 +485,7 @@ endfunc func Test_visual_block_put_invalid() enew! + " behave mswin set selection=exclusive norm yy norm v)Ps/^/ @@ -492,6 +493,7 @@ func Test_visual_block_put_invalid() silent norm ggv)P bwipe! + " behave xterm set selection& endfunc |