diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-12-11 16:17:02 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-12-11 16:17:02 +0100 |
commit | 91376b63877c113fe9a3fff2c1b04bf9504f447f (patch) | |
tree | 1b5935e090c0b0f49a6b8a491093d088b68268f3 | |
parent | 1c57fe8b9450eb29c3e42a94527d4b7514f853e2 (diff) | |
download | vim-git-91376b63877c113fe9a3fff2c1b04bf9504f447f.tar.gz |
patch 7.4.964v7.4.964
Problem: Test 87 doesn't work in a shadow directory.
Solution: Handle the extra subdirectory. (James McCoy, closes #515)
-rw-r--r-- | src/testdir/test87.in | 15 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/testdir/test87.in b/src/testdir/test87.in index fedc7959f..2308fde97 100644 --- a/src/testdir/test87.in +++ b/src/testdir/test87.in @@ -910,8 +910,19 @@ fnamemodify = vim.Function('fnamemodify') cb.append(str(fnamemodify('.', ':p:h:t'))) cb.append(vim.eval('@%')) os.chdir('..') -cb.append(str(fnamemodify('.', ':p:h:t'))) -cb.append(vim.eval('@%').replace(os.path.sep, '/')) +path = fnamemodify('.', ':p:h:t') +if path != b'src': + # Running tests from a shadow directory, so move up another level + # This will result in @% looking like shadow/testdir/test87.in, hence the + # slicing to remove the leading path and path separator + os.chdir('..') + cb.append(str(fnamemodify('.', ':p:h:t'))) + cb.append(vim.eval('@%')[len(path)+1:].replace(os.path.sep, '/')) + os.chdir(path) +else: + cb.append(str(fnamemodify('.', ':p:h:t'))) + cb.append(vim.eval('@%').replace(os.path.sep, '/')) +del path os.chdir('testdir') cb.append(str(fnamemodify('.', ':p:h:t'))) cb.append(vim.eval('@%')) diff --git a/src/version.c b/src/version.c index b18ea0236..3fc57c5e5 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 964, +/**/ 963, /**/ 962, |