diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-01-13 19:59:05 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2018-01-15 23:58:52 +0100 |
| commit | 2b1bcd446b6d95f608161818addecf7c6a2beeaa (patch) | |
| tree | 605d17f83276ef93f4c0dca40004a0ad6c8d7eb4 /src/nvim/testdir/shared.vim | |
| parent | 8eb0888a5de2481e15fcae63fa477f0ac634c9f2 (diff) | |
| download | rneovim-2b1bcd446b6d95f608161818addecf7c6a2beeaa.tar.gz rneovim-2b1bcd446b6d95f608161818addecf7c6a2beeaa.tar.bz2 rneovim-2b1bcd446b6d95f608161818addecf7c6a2beeaa.zip | |
runtime: include en.utf-8.spl
Install en.utf-8.spl by default.
- Allows spell-related tests to run.
- Avoids download prompt for spelllang=en users
Diffstat (limited to 'src/nvim/testdir/shared.vim')
| -rw-r--r-- | src/nvim/testdir/shared.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index 72cfea96c6..d8e2d1d718 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -1,5 +1,21 @@ " Functions shared by several tests. +" {Nvim} +" Filepath captured from output may be truncated, like this: +" /home/va...estdir/Xtest-tmpdir/nvimxbXN4i/10 +" Get last 2 segments, then combine with $TMPDIR. +func! Fix_truncated_tmpfile(fname) + " sanity check + if $TMPDIR ==# '' + throw '$TMPDIR is empty' + endif + if a:fname !~# $TMPDIR + throw '$TMPDIR not in fname: '.a:fname + endif + let last2segments = matchstr(a:fname, '[\/][^\/]\+[\/][^\/]\+$') + return $TMPDIR.last2segments +endfunc + " Get the name of the Python executable. " Also keeps it in s:python. func PythonProg() |