annotate src/testdir/test_escaped_glob.vim @ 12746:27eee6528b3d v8.0.1251

patch 8.0.1251: invalid expressin passed to WaitFor() commit https://github.com/vim/vim/commit/d97fbf171ec0e63117813da045d2a1c51a9b6f62 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 2 19:23:03 2017 +0100 patch 8.0.1251: invalid expressin passed to WaitFor() Problem: Invalid expressin passed to WaitFor(). Solution: Check if the variable exists.
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2017 19:30:06 +0100
parents 140d51d5b5c3
children 9e04de2aa738
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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