Bram Moolenaar | 5c71994 | 2016-07-09 23:40:45 +0200 | [diff] [blame] | 1 | " Test 'autochdir' behavior |
2 | |||||
3 | if !exists("+autochdir") | ||||
4 | finish | ||||
5 | endif | ||||
6 | |||||
7 | func Test_set_filename() | ||||
8 | call test_autochdir() | ||||
9 | set acd | ||||
10 | new | ||||
11 | w samples/Xtest | ||||
12 | call assert_equal("Xtest", expand('%')) | ||||
13 | call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', '')) | ||||
14 | bwipe! | ||||
15 | set noacd | ||||
16 | call delete('samples/Xtest') | ||||
17 | endfunc |