Mercurial > vim
annotate src/testdir/test_glob2regpat.vim @ 17516:711db62c8aca v8.1.1756
patch 8.1.1756: autocommand that splits window messes up window layout
commit https://github.com/vim/vim/commit/1417c766f55e5959b31da488417b7d9b141404af
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 27 17:31:36 2019 +0200
patch 8.1.1756: autocommand that splits window messes up window layout
Problem: Autocommand that splits window messes up window layout.
Solution: Disallow splitting a window while closing one. In ":all" give an
error when moving a window will not work.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 27 Jul 2019 17:45:06 +0200 |
parents | 8846b8344430 |
children | 9fac6d0de69a |
rev | line source |
---|---|
7767
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test glob2regpat() |
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
14383
8846b8344430
patch 8.1.0206: duplicate test function name
Christian Brabandt <cb@256bit.org>
parents:
9842
diff
changeset
|
3 func Test_glob2regpat_invalid() |
7767
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 call assert_fails('call glob2regpat(1.33)', 'E806:') |
9820
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
5 call assert_fails('call glob2regpat("}")', 'E219:') |
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
6 call assert_fails('call glob2regpat("{")', 'E220:') |
7767
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 endfunc |
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 |
14383
8846b8344430
patch 8.1.0206: duplicate test function name
Christian Brabandt <cb@256bit.org>
parents:
9842
diff
changeset
|
9 func Test_glob2regpat_valid() |
7767
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 call assert_equal('^foo\.', glob2regpat('foo.*')) |
9820
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
11 call assert_equal('^foo.$', glob2regpat('foo?')) |
7767
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call assert_equal('\.vim$', glob2regpat('*.vim')) |
9820
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
13 call assert_equal('^[abc]$', glob2regpat('[abc]')) |
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
14 call assert_equal('^foo bar$', glob2regpat('foo\ bar')) |
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
15 call assert_equal('^foo,bar$', glob2regpat('foo,bar')) |
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
16 call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}')) |
6882920b42da
commit https://github.com/vim/vim/commit/71dd9744cf3842cd45295010d2e5692da1651537
Christian Brabandt <cb@256bit.org>
parents:
7767
diff
changeset
|
17 call assert_equal('.*', glob2regpat('**')) |
9824
0524e72c9023
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Christian Brabandt <cb@256bit.org>
parents:
9820
diff
changeset
|
18 |
9842
f8396c6e5709
commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8
Christian Brabandt <cb@256bit.org>
parents:
9824
diff
changeset
|
19 if exists('+shellslash') |
f8396c6e5709
commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8
Christian Brabandt <cb@256bit.org>
parents:
9824
diff
changeset
|
20 call assert_equal('^foo[\/].$', glob2regpat('foo\?')) |
f8396c6e5709
commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8
Christian Brabandt <cb@256bit.org>
parents:
9824
diff
changeset
|
21 call assert_equal('^\(foo[\/]\|bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}')) |
f8396c6e5709
commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8
Christian Brabandt <cb@256bit.org>
parents:
9824
diff
changeset
|
22 call assert_equal('^[\/]\(foo\|bar[\/]\)$', glob2regpat('\{foo,bar\}')) |
f8396c6e5709
commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8
Christian Brabandt <cb@256bit.org>
parents:
9824
diff
changeset
|
23 call assert_equal('^[\/][\/]\(foo\|bar[\/][\/]\)$', glob2regpat('\\{foo,bar\\}')) |
f8396c6e5709
commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8
Christian Brabandt <cb@256bit.org>
parents:
9824
diff
changeset
|
24 else |
9824
0524e72c9023
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Christian Brabandt <cb@256bit.org>
parents:
9820
diff
changeset
|
25 call assert_equal('^foo?$', glob2regpat('foo\?')) |
0524e72c9023
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Christian Brabandt <cb@256bit.org>
parents:
9820
diff
changeset
|
26 call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}')) |
0524e72c9023
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Christian Brabandt <cb@256bit.org>
parents:
9820
diff
changeset
|
27 call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}')) |
0524e72c9023
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Christian Brabandt <cb@256bit.org>
parents:
9820
diff
changeset
|
28 call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}')) |
0524e72c9023
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Christian Brabandt <cb@256bit.org>
parents:
9820
diff
changeset
|
29 endif |
7767
c9daa07abf34
commit https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 endfunc |