Mercurial > vim
annotate src/testdir/test_escaped_glob.vim @ 14455:f713e016097d v8.1.0241
patch 8.1.0241: effect of ":tabmove N" is not clear
commit https://github.com/vim/vim/commit/7cc596547a582e7bc18d91312eb674906ebdc5c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 7 13:14:46 2018 +0200
patch 8.1.0241: effect of ":tabmove N" is not clear
Problem: Effect of ":tabmove N" is not clear.
Solution: Add a test that shows the behavior. (Christian Brabandt,
closes #3288)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 07 Aug 2018 13:15:04 +0200 |
parents | f7b2ecaeb79c |
children | b1df7f99efb7 |
rev | line source |
---|---|
11651
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test whether glob()/globpath() return correct results with certain escaped |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " characters. |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 function SetUp() |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 " make sure glob() doesn't use the shell |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 set shell=doesnotexist |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 " consistent sorting of file names |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 set nofileignorecase |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 endfunction |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 function Test_glob() |
12899
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
12 if !has('unix') |
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
13 " This test fails on Windows because of the special characters in the |
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
14 " filenames. Disable the test on non-Unix systems for now. |
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
15 return |
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
16 endif |
11651
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call assert_equal("", glob('Xxx\{')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call assert_equal("", glob('Xxx\$')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 w! Xxx{ |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 w! Xxx\$ |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call assert_equal("Xxx{", glob('Xxx\{')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 call assert_equal("Xxx$", glob('Xxx\$')) |
12899
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
23 call delete('Xxx{') |
9e04de2aa738
patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
11651
diff
changeset
|
24 call delete('Xxx$') |
11651
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 endfunction |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 function Test_globpath() |
13002
f7b2ecaeb79c
patch 8.0.1377: cannot call a dict function in autoloaded dict
Christian Brabandt <cb@256bit.org>
parents:
12899
diff
changeset
|
28 call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim", |
f7b2ecaeb79c
patch 8.0.1377: cannot call a dict function in autoloaded dict
Christian Brabandt <cb@256bit.org>
parents:
12899
diff
changeset
|
29 \ globpath('sautest/autoload', 'glob*.vim')) |
f7b2ecaeb79c
patch 8.0.1377: cannot call a dict function in autoloaded dict
Christian Brabandt <cb@256bit.org>
parents:
12899
diff
changeset
|
30 call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'], |
f7b2ecaeb79c
patch 8.0.1377: cannot call a dict function in autoloaded dict
Christian Brabandt <cb@256bit.org>
parents:
12899
diff
changeset
|
31 \ globpath('sautest/autoload', 'glob*.vim', 0, 1)) |
11651
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 endfunction |