mirror of
https://github.com/vim/vim.git
synced 2025-10-09 06:14:17 -04:00
patch 7.4.964
Problem: Test 87 doesn't work in a shadow directory. Solution: Handle the extra subdirectory. (James McCoy, closes #515)
This commit is contained in:
@@ -910,8 +910,19 @@ fnamemodify = vim.Function('fnamemodify')
|
|||||||
cb.append(str(fnamemodify('.', ':p:h:t')))
|
cb.append(str(fnamemodify('.', ':p:h:t')))
|
||||||
cb.append(vim.eval('@%'))
|
cb.append(vim.eval('@%'))
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
cb.append(str(fnamemodify('.', ':p:h:t')))
|
path = fnamemodify('.', ':p:h:t')
|
||||||
cb.append(vim.eval('@%').replace(os.path.sep, '/'))
|
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')
|
os.chdir('testdir')
|
||||||
cb.append(str(fnamemodify('.', ':p:h:t')))
|
cb.append(str(fnamemodify('.', ':p:h:t')))
|
||||||
cb.append(vim.eval('@%'))
|
cb.append(vim.eval('@%'))
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
964,
|
||||||
/**/
|
/**/
|
||||||
963,
|
963,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user