annotate src/testdir/test_escaped_glob.vim @ 12343:72046661f6d0 v8.0.1051

patch 8.0.1051: cannot run terminal with spaces in argument commit https://github.com/vim/vim/commit/9d654a8d8cd3421307445f111785fb303a38c2a0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 3 19:52:17 2017 +0200 patch 8.0.1051: cannot run terminal with spaces in argument Problem: Cannot run terminal with spaces in argument. Solution: Accept backslash to escape space and other characters. (closes #1999)
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Sep 2017 20:00:04 +0200
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