Skip to content

Commit 91376b6

Browse files
committed
patch 7.4.964
Problem: Test 87 doesn't work in a shadow directory. Solution: Handle the extra subdirectory. (James McCoy, closes #515)
1 parent 1c57fe8 commit 91376b6

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/testdir/test87.in

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,19 @@ fnamemodify = vim.Function('fnamemodify')
910910
cb.append(str(fnamemodify('.', ':p:h:t')))
911911
cb.append(vim.eval('@%'))
912912
os.chdir('..')
913-
cb.append(str(fnamemodify('.', ':p:h:t')))
914-
cb.append(vim.eval('@%').replace(os.path.sep, '/'))
913+
path = fnamemodify('.', ':p:h:t')
914+
if path != b'src':
915+
# Running tests from a shadow directory, so move up another level
916+
# This will result in @% looking like shadow/testdir/test87.in, hence the
917+
# slicing to remove the leading path and path separator
918+
os.chdir('..')
919+
cb.append(str(fnamemodify('.', ':p:h:t')))
920+
cb.append(vim.eval('@%')[len(path)+1:].replace(os.path.sep, '/'))
921+
os.chdir(path)
922+
else:
923+
cb.append(str(fnamemodify('.', ':p:h:t')))
924+
cb.append(vim.eval('@%').replace(os.path.sep, '/'))
925+
del path
915926
os.chdir('testdir')
916927
cb.append(str(fnamemodify('.', ':p:h:t')))
917928
cb.append(vim.eval('@%'))

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
964,
744746
/**/
745747
963,
746748
/**/

0 commit comments

Comments
 (0)