Mercurial > vim
annotate src/testdir/test_escaped_glob.vim @ 12742:af961e38e508 v8.0.1249
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
commit https://github.com/vim/vim/commit/c20e0d52071a3f6e12321ec3344024faa4695da9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 18:19:19 2017 +0100
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
Problem: No error when WaitFor() gets an invalid wrong expression.
Solution: Do not ignore errors in evaluationg the expression. Fix places
where the expression was wrong.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 18:30:05 +0100 |
parents | 140d51d5b5c3 |
children | 9e04de2aa738 |
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() |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call assert_equal("", glob('Xxx\{')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 call assert_equal("", glob('Xxx\$')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 w! Xxx{ |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 w! Xxx\$ |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 call assert_equal("Xxx{", glob('Xxx\{')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call assert_equal("Xxx$", glob('Xxx\$')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 endfunction |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 function Test_globpath() |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call assert_equal("sautest/autoload/Test104.vim\nsautest/autoload/footest.vim", |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 \ globpath('sautest/autoload', '*.vim')) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 call assert_equal(['sautest/autoload/Test104.vim', 'sautest/autoload/footest.vim'], |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 \ globpath('sautest/autoload', '*.vim', 0, 1)) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 endfunction |