Skip to content

Commit 19c1ccd

Browse files
committed
Use $VIM in runtimepath test.
1 parent 5917e57 commit 19c1ccd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_vim.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ def test_strwidth():
3434
@with_setup(setup=cleanup)
3535
def test_list_runtime_paths():
3636
# Is this the default runtime path list?
37-
homedir = os.environ['HOME'] + '/.nvim'
37+
homedir = os.path.join(os.environ['HOME'], '.nvim')
38+
vimdir = vim.eval('$VIM')
3839
dflt_rtp = [
3940
homedir,
40-
'/usr/local/share/nvim/vimfiles',
41-
'/usr/local/share/nvim',
42-
'/usr/local/share/nvim/vimfiles/after'
41+
os.path.join(vimdir, 'vimfiles'),
42+
vimdir,
43+
os.path.join(vimdir, 'vimfiles', 'after')
4344
]
4445
# If the runtime is installed the default path
4546
# is nvim/runtime
4647
dflt_rtp2 = list(dflt_rtp)
47-
dflt_rtp2[2] += '/runtime'
48+
dflt_rtp2[2] = os.path.join(dflt_rtp2[2], 'runtime')
4849

4950
rtp = vim.list_runtime_paths()
5051
ok(rtp == dflt_rtp or rtp == dflt_rtp2)
5152

5253

53-
5454
@with_setup(setup=cleanup)
5555
def test_chdir():
5656
pwd = vim.eval('getcwd()')

0 commit comments

Comments
 (0)