Mercurial > vim
annotate src/testdir/test_autochdir.vim @ 15613:90f01701ecad v8.1.0814
patch 8.1.0814: :mksession cannot handle a very long 'runtimepath'
commit https://github.com/vim/vim/commit/ed18f2c03ae4786b489943cb575bb781a70356e4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 20:30:52 2019 +0100
patch 8.1.0814: :mksession cannot handle a very long 'runtimepath'
Problem: :mksession cannot handle a very long 'runtimepath'. (Timothy
Madden)
Solution: Expand each part separately, instead of the whole option at once.
(Christian Brabandt, closes #3466)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 20:45:06 +0100 |
parents | 90ab2d3ce11d |
children | ebdf6cd89910 |
rev | line source |
---|---|
9469
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test 'autochdir' behavior |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 if !exists("+autochdir") |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 finish |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 endif |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 func Test_set_filename() |
12692
03a6aeea2096
patch 8.0.1224: still interference between test functions
Christian Brabandt <cb@256bit.org>
parents:
9469
diff
changeset
|
8 let cwd = getcwd() |
9469
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 call test_autochdir() |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 set acd |
15184
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
11 |
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
12 let s:li = [] |
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
13 autocmd DirChanged auto call add(s:li, "autocd") |
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
14 autocmd DirChanged auto call add(s:li, expand("<afile>")) |
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
15 |
9469
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 new |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 w samples/Xtest |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call assert_equal("Xtest", expand('%')) |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', '')) |
15184
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
20 call assert_equal(["autocd", getcwd()], s:li) |
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
21 |
9469
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 bwipe! |
15184
90ab2d3ce11d
patch 8.1.0602: DirChanged is also triggered when directory didn't change
Bram Moolenaar <Bram@vim.org>
parents:
12692
diff
changeset
|
23 au! DirChanged |
9469
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 set noacd |
12692
03a6aeea2096
patch 8.0.1224: still interference between test functions
Christian Brabandt <cb@256bit.org>
parents:
9469
diff
changeset
|
25 exe 'cd ' . cwd |
9469
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 call delete('samples/Xtest') |
38e2fc4ee4ef
commit https://github.com/vim/vim/commit/5c71994f4ee5f87d4cce990dbc9684c70b1e108b
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 endfunc |