Mercurial > vim
view src/testdir/test_glob2regpat.vim @ 13115:9812a9ca3ab2 v8.0.1432
patch 8.0.1432: after ":copen" can't get the window-ID of the quickfix window
commit https://github.com/vim/vim/commit/2ec364e94dbc080ccdf6c5dfc6f1653b5b7ded64
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 27 11:52:13 2018 +0100
patch 8.0.1432: after ":copen" can't get the window-ID of the quickfix window
Problem: After ":copen" can't get the window-ID of the quickfix window.
(FalacerSelene)
Solution: Make it work without a quickfix list. Add a test. (Yegappan
Lakshmanan, closes #2541)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 27 Jan 2018 12:00:06 +0100 |
parents | f8396c6e5709 |
children | 8846b8344430 |
line wrap: on
line source
" Test glob2regpat() func Test_invalid() call assert_fails('call glob2regpat(1.33)', 'E806:') call assert_fails('call glob2regpat("}")', 'E219:') call assert_fails('call glob2regpat("{")', 'E220:') endfunc func Test_valid() call assert_equal('^foo\.', glob2regpat('foo.*')) call assert_equal('^foo.$', glob2regpat('foo?')) call assert_equal('\.vim$', glob2regpat('*.vim')) call assert_equal('^[abc]$', glob2regpat('[abc]')) call assert_equal('^foo bar$', glob2regpat('foo\ bar')) call assert_equal('^foo,bar$', glob2regpat('foo,bar')) call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}')) call assert_equal('.*', glob2regpat('**')) if exists('+shellslash') call assert_equal('^foo[\/].$', glob2regpat('foo\?')) call assert_equal('^\(foo[\/]\|bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}')) call assert_equal('^[\/]\(foo\|bar[\/]\)$', glob2regpat('\{foo,bar\}')) call assert_equal('^[\/][\/]\(foo\|bar[\/][\/]\)$', glob2regpat('\\{foo,bar\\}')) else call assert_equal('^foo?$', glob2regpat('foo\?')) call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}')) call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}')) call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}')) endif endfunc