File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,8 @@ test: test/vader.vim
2020 @cd test && $(VIM ) $(VIM_FLAGS ) -o fixture/foo.link fixture/bar.link -c ' Vader! symlink-split-horizontal.vader'
2121 @cd test && $(VIM ) $(VIM_FLAGS ) -O fixture/foo.link fixture/bar.link -c ' Vader! symlink-split-vertical.vader'
2222 @cd test && $(VIM ) $(VIM_FLAGS ) -d fixture/foo.link fixture/bar.link -c ' Vader! symlink-split-vertical.vader'
23+ @cd test && $(VIM ) $(VIM_FLAGS ) \
24+ --cmd ' autocmd! BufReadPre foo.link let b:symlink_should_resolve_path = 0' \
25+ --cmd ' autocmd! BufReadPre bar.link let b:symlink_should_resolve_path = 1' \
26+ -o fixture/foo.link fixture/bar.link \
27+ -c ' Vader! options.vader'
Original file line number Diff line number Diff line change 1+ Before:
2+ execute 'cd' fnameescape(fnamemodify(g:vader_file, ':p:h'))
3+
4+ " It should follow the symlinks for every file
5+ Execute (skip the 2 Vader.vim buffers):
6+ quit!
7+ quit!
8+
9+ Then (assert that the windows are in the right order with the right content):
10+ AssertEqual 1, tabpagenr('$')
11+ AssertEqual 2, winnr('$')
12+ 1 wincmd w
13+ AssertEqual 'fixture/foo.link', bufname()
14+ Assert !get(b:, 'symlink_should_resolve_path', 1)
15+ wincmd j
16+ AssertEqual 'fixture/bar', bufname()
17+ Assert get(b:, 'symlink_should_resolve_path', 1)
18+ AssertEqual ['bar'], getline(1, '$')
You can’t perform that action at this time.
0 commit comments