annotate src/testdir/test_expand.vim @ 34829:7e93120ed584 v9.1.0284

patch 9.1.0284: make testclean is not able to delete failed screendumps Commit: https://github.com/vim/vim/commit/e20c7d7f442e0d42d78db7337c1b5e7a3ff91671 Author: Julio B <julio.bacel@gmail.com> Date: Tue Apr 9 21:22:41 2024 +0200 patch 9.1.0284: make testclean is not able to delete failed screendumps Problem: make testclean is not able to delete failed screendumps. Solution: Remove the "failed" directory when necessary. (Julio B) Patch 8.1.1080 changed the way that failed screendumps are saved, but the "rm -rf *.failed" clean command was not ported correctly. closes: #14468 Signed-off-by: Julio B <julio.bacel@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 09 Apr 2024 21:30:04 +0200
parents 5397ce113043
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7617
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for expanding file names
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
3 source shared.vim
26183
9865f996a3c0 patch 8.2.3623: "$*" is expanded to "nonomatch"
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
4 source check.vim
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
5
7617
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 func Test_with_directories()
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 call mkdir('Xdir1')
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 call mkdir('Xdir2')
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 call mkdir('Xdir3')
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 cd Xdir3
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 call mkdir('Xdir4')
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 cd ..
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 split Xdir1/file
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 call setline(1, ['a', 'b'])
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 w
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 w Xdir3/Xdir4/file
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 close
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 next Xdir?/*/file
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 call assert_equal('Xdir3/Xdir4/file', expand('%'))
7623
2720952e9acb commit https://github.com/vim/vim/commit/f60b796fa9870bdfc4cdeb91653bac041916077d
Christian Brabandt <cb@256bit.org>
parents: 7617
diff changeset
22 if has('unix')
2720952e9acb commit https://github.com/vim/vim/commit/f60b796fa9870bdfc4cdeb91653bac041916077d
Christian Brabandt <cb@256bit.org>
parents: 7617
diff changeset
23 next! Xdir?/*/nofile
2720952e9acb commit https://github.com/vim/vim/commit/f60b796fa9870bdfc4cdeb91653bac041916077d
Christian Brabandt <cb@256bit.org>
parents: 7617
diff changeset
24 call assert_equal('Xdir?/*/nofile', expand('%'))
2720952e9acb commit https://github.com/vim/vim/commit/f60b796fa9870bdfc4cdeb91653bac041916077d
Christian Brabandt <cb@256bit.org>
parents: 7617
diff changeset
25 endif
7643
2b2e90fcd72b commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Christian Brabandt <cb@256bit.org>
parents: 7623
diff changeset
26 " Edit another file, on MS-Windows the swap file would be in use and can't
2b2e90fcd72b commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Christian Brabandt <cb@256bit.org>
parents: 7623
diff changeset
27 " be deleted.
2b2e90fcd72b commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Christian Brabandt <cb@256bit.org>
parents: 7623
diff changeset
28 edit foo
7617
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29
7643
2b2e90fcd72b commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Christian Brabandt <cb@256bit.org>
parents: 7623
diff changeset
30 call assert_equal(0, delete('Xdir1', 'rf'))
2b2e90fcd72b commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Christian Brabandt <cb@256bit.org>
parents: 7623
diff changeset
31 call assert_equal(0, delete('Xdir2', 'rf'))
2b2e90fcd72b commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Christian Brabandt <cb@256bit.org>
parents: 7623
diff changeset
32 call assert_equal(0, delete('Xdir3', 'rf'))
7617
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 endfunc
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 func Test_with_tilde()
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 let dir = getcwd()
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 call mkdir('Xdir ~ dir')
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 call assert_true(isdirectory('Xdir ~ dir'))
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 cd Xdir\ ~\ dir
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 call assert_true(getcwd() =~ 'Xdir \~ dir')
18568
26a04a556982 patch 8.1.2278: using "cd" with "exe" may fail
Bram Moolenaar <Bram@vim.org>
parents: 17849
diff changeset
41 call chdir(dir)
7617
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 call delete('Xdir ~ dir', 'd')
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 call assert_false(isdirectory('Xdir ~ dir'))
80bc36419c21 commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 endfunc
14393
c62601adad69 patch 8.1.0211: expanding a file name "~" results in $HOME
Christian Brabandt <cb@256bit.org>
parents: 7643
diff changeset
45
c62601adad69 patch 8.1.0211: expanding a file name "~" results in $HOME
Christian Brabandt <cb@256bit.org>
parents: 7643
diff changeset
46 func Test_expand_tilde_filename()
c62601adad69 patch 8.1.0211: expanding a file name "~" results in $HOME
Christian Brabandt <cb@256bit.org>
parents: 7643
diff changeset
47 split ~
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30405
diff changeset
48 call assert_equal('~', expand('%'))
14393
c62601adad69 patch 8.1.0211: expanding a file name "~" results in $HOME
Christian Brabandt <cb@256bit.org>
parents: 7643
diff changeset
49 call assert_notequal(expand('%:p'), expand('~/'))
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30405
diff changeset
50 call assert_match('\~', expand('%:p'))
14393
c62601adad69 patch 8.1.0211: expanding a file name "~" results in $HOME
Christian Brabandt <cb@256bit.org>
parents: 7643
diff changeset
51 bwipe!
c62601adad69 patch 8.1.0211: expanding a file name "~" results in $HOME
Christian Brabandt <cb@256bit.org>
parents: 7643
diff changeset
52 endfunc
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
53
34511
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
54 func Test_expand_env_pathsep()
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
55 let $FOO = './foo'
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
56 call assert_equal('./foo/bar', expand('$FOO/bar'))
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
57 let $FOO = './foo/'
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
58 call assert_equal('./foo/bar', expand('$FOO/bar'))
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
59 let $FOO = 'C:'
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
60 call assert_equal('C:/bar', expand('$FOO/bar'))
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
61 let $FOO = 'C:/'
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
62 call assert_equal('C:/bar', expand('$FOO/bar'))
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
63
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
64 unlet $FOO
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
65 endfunc
5397ce113043 patch 9.1.0161: expand() removes slash after env variable that ends with colon
Christian Brabandt <cb@256bit.org>
parents: 31849
diff changeset
66
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
67 func Test_expandcmd()
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
68 let $FOO = 'Test'
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
69 call assert_equal('e x/Test/y', expandcmd('e x/$FOO/y'))
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
70 unlet $FOO
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
71
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
72 new
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
73 edit Xpandfile1
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
74 call assert_equal('e Xpandfile1', expandcmd('e %'))
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
75 edit Xpandfile2
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
76 edit Xpandfile1
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
77 call assert_equal('e Xpandfile2', 'e #'->expandcmd())
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
78 edit Xpandfile2
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
79 edit Xpandfile3
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
80 edit Xpandfile4
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
81 let bnum = bufnr('Xpandfile2')
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
82 call assert_equal('e Xpandfile2', expandcmd('e #' . bnum))
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
83 call setline('.', 'Vim!@#')
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
84 call assert_equal('e Vim', expandcmd('e <cword>'))
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
85 call assert_equal('e Vim!@#', expandcmd('e <cWORD>'))
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
86 enew!
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
87 edit Xpandfile.java
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
88 call assert_equal('e Xpandfile.py', expandcmd('e %:r.py'))
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
89 call assert_equal('make abc.java', expandcmd('make abc.%:e'))
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
90 call assert_equal('make Xabc.java', expandcmd('make %:s?pandfile?abc?'))
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
91 edit a1a2a3.rb
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 28735
diff changeset
92 call assert_equal('make b1b2b3.rb a1a2a3 Xpandfile.o', expandcmd('make %:gs?a?b? %< #<.o'))
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
93
28283
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
94 call assert_equal('make <afile>', expandcmd("make <afile>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
95 call assert_equal('make <amatch>', expandcmd("make <amatch>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
96 call assert_equal('make <abuf>', expandcmd("make <abuf>"))
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
97 enew
28283
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
98 call assert_equal('make %', expandcmd("make %"))
19471
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
99 let $FOO="blue\tsky"
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
100 call setline(1, "$FOO")
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
101 call assert_equal("grep pat blue\tsky", expandcmd('grep pat <cfile>'))
19906
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
102
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
103 " Test for expression expansion `=
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
104 let $FOO= "blue"
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
105 call assert_equal("blue sky", expandcmd("`=$FOO .. ' sky'`"))
28307
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
106 let x = expandcmd("`=axbycz`")
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
107 call assert_equal('`=axbycz`', x)
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
108 call assert_fails('let x = expandcmd("`=axbycz`", #{errmsg: 1})', 'E121:')
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
109 let x = expandcmd("`=axbycz`", #{abc: []})
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
110 call assert_equal('`=axbycz`', x)
19906
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
111
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
112 " Test for env variable with spaces
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
113 let $FOO= "foo bar baz"
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
114 call assert_equal("e foo bar baz", expandcmd("e $FOO"))
031184ace7c5 patch 8.2.0509: various code is not properly tested.
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
115
28307
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
116 if has('unix') && executable('bash')
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
117 " test for using the shell to expand a command argument.
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
118 " only bash supports the {..} syntax
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
119 set shell=bash
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
120 let x = expandcmd('{1..4}')
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
121 call assert_equal('{1..4}', x)
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
122 call assert_fails("let x = expandcmd('{1..4}', #{errmsg: v:true})", 'E77:')
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
123 let x = expandcmd('{1..4}', #{error: v:true})
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
124 call assert_equal('{1..4}', x)
425700af491b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Bram Moolenaar <Bram@vim.org>
parents: 28283
diff changeset
125 set shell&
28283
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
126 endif
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
127
19471
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
128 unlet $FOO
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
129 close!
17020
1841c03a9b5e patch 8.1.1510: a plugin cannot easily expand a command like done internally
Bram Moolenaar <Bram@vim.org>
parents: 14393
diff changeset
130 endfunc
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
131
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
132 " Test for expanding <sfile>, <slnum> and <sflnum> outside of sourcing a script
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
133 func Test_source_sfile()
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
134 let lines =<< trim [SCRIPT]
28283
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
135 :call assert_equal('<sfile>', expandcmd("<sfile>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
136 :call assert_equal('<slnum>', expandcmd("<slnum>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
137 :call assert_equal('<sflnum>', expandcmd("<sflnum>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
138 :call assert_equal('edit <cfile>', expandcmd("edit <cfile>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
139 :call assert_equal('edit #', expandcmd("edit #"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
140 :call assert_equal('edit #<2', expandcmd("edit #<2"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
141 :call assert_equal('edit <cword>', expandcmd("edit <cword>"))
2fd2ce8a556c patch 8.2.4667: expandcmd() fails on an error
Bram Moolenaar <Bram@vim.org>
parents: 26183
diff changeset
142 :call assert_equal('edit <cexpr>', expandcmd("edit <cexpr>"))
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
143 :call assert_fails('autocmd User MyCmd echo "<sfile>"', 'E498:')
28431
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
144 :
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
145 :call assert_equal('', expand('<script>'))
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
146 :verbose echo expand('<script>')
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
147 :call add(v:errors, v:errmsg)
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
148 :verbose echo expand('<sfile>')
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
149 :call add(v:errors, v:errmsg)
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
150 :call writefile(v:errors, 'Xresult')
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
151 :qall!
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
152 [SCRIPT]
30405
ea38db8639eb patch 9.0.0538: manually deleting test temp files
Bram Moolenaar <Bram@vim.org>
parents: 30051
diff changeset
153 call writefile(lines, 'Xscript', 'D')
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
154 if RunVim([], [], '--clean -s Xscript')
28431
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
155 call assert_equal([
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
156 \ 'E1274: No script file name to substitute for "<script>"',
28735
c428a4e53b9c patch 8.2.4892: test failures because of changed error messages
Bram Moolenaar <Bram@vim.org>
parents: 28449
diff changeset
157 \ 'E498: No :source file name to substitute for "<sfile>"'],
28431
4fbdd4ce9edb patch 8.2.4740: when expand() fails there is no error message
Bram Moolenaar <Bram@vim.org>
parents: 28403
diff changeset
158 \ readfile('Xresult'))
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
159 endif
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
160 call delete('Xresult')
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
161 endfunc
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
162
19471
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
163 " Test for expanding filenames multiple times in a command line
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
164 func Test_expand_filename_multicmd()
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
165 edit foo
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
166 call setline(1, 'foo!')
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
167 new
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
168 call setline(1, 'foo!')
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
169 new <cword> | new <cWORD>
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
170 call assert_equal(4, winnr('$'))
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
171 call assert_equal('foo!', bufname(winbufnr(1)))
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
172 call assert_equal('foo', bufname(winbufnr(2)))
19932
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19906
diff changeset
173 call assert_fails('e %:s/.*//', 'E500:')
19471
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
174 %bwipe!
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
175 endfunc
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
176
26183
9865f996a3c0 patch 8.2.3623: "$*" is expanded to "nonomatch"
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
177 func Test_expandcmd_shell_nonomatch()
9865f996a3c0 patch 8.2.3623: "$*" is expanded to "nonomatch"
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
178 CheckNotMSWindows
9865f996a3c0 patch 8.2.3623: "$*" is expanded to "nonomatch"
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
179 call assert_equal('$*', expandcmd('$*'))
9865f996a3c0 patch 8.2.3623: "$*" is expanded to "nonomatch"
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
180 endfunc
9865f996a3c0 patch 8.2.3623: "$*" is expanded to "nonomatch"
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
181
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
182 func Test_expand_script_source()
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
183 let lines0 =<< trim [SCRIPT]
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
184 call extend(g:script_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
185 so Xscript1
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
186 func F0()
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
187 call extend(g:func_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
188 endfunc
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
189
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
190 au User * call extend(g:au_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
191 [SCRIPT]
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
192
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
193 let lines1 =<< trim [SCRIPT]
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
194 call extend(g:script_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
195 so Xscript2
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
196 func F1()
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
197 call extend(g:func_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
198 endfunc
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
199
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
200 au User * call extend(g:au_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
201 [SCRIPT]
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
202
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
203 let lines2 =<< trim [SCRIPT]
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
204 call extend(g:script_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
205 func F2()
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
206 call extend(g:func_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
207 endfunc
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
208
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
209 au User * call extend(g:au_level, [expand('<script>:t')])
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
210 [SCRIPT]
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
211
30405
ea38db8639eb patch 9.0.0538: manually deleting test temp files
Bram Moolenaar <Bram@vim.org>
parents: 30051
diff changeset
212 call writefile(lines0, 'Xscript0', 'D')
ea38db8639eb patch 9.0.0538: manually deleting test temp files
Bram Moolenaar <Bram@vim.org>
parents: 30051
diff changeset
213 call writefile(lines1, 'Xscript1', 'D')
ea38db8639eb patch 9.0.0538: manually deleting test temp files
Bram Moolenaar <Bram@vim.org>
parents: 30051
diff changeset
214 call writefile(lines2, 'Xscript2', 'D')
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
215
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
216 " Check the expansion of <script> at different levels.
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
217 let g:script_level = []
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
218 let g:func_level = []
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
219 let g:au_level = []
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
220
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
221 so Xscript0
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
222 call F0()
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
223 call F1()
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
224 call F2()
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
225 doautocmd User
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
226
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
227 call assert_equal(['Xscript0', 'Xscript1', 'Xscript2'], g:script_level)
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
228 call assert_equal(['Xscript0', 'Xscript1', 'Xscript2'], g:func_level)
28449
80ed5ad30d28 patch 8.2.4749: <script> is not expanded in autocmd context
Bram Moolenaar <Bram@vim.org>
parents: 28431
diff changeset
229 call assert_equal(['Xscript2', 'Xscript1', 'Xscript0'], g:au_level)
28403
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
230
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
231 unlet g:script_level g:func_level
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
232 delfunc F0
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
233 delfunc F1
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
234 delfunc F2
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
235 endfunc
2655935b5ccc patch 8.2.4726: cannot use expand() to get the script name
Bram Moolenaar <Bram@vim.org>
parents: 28307
diff changeset
236
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 18568
diff changeset
237 " vim: shiftwidth=2 sts=2 expandtab