summaryrefslogtreecommitdiff
path: root/src/testdir/test86.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-13 14:08:16 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-13 14:08:16 +0200
commit8e46f7264cc303ae3fd723b2f27badccb1d68fbf (patch)
tree738fe32eb45a4e80a5973220ef2c1f3a311df56f /src/testdir/test86.in
parent3ff9b185fe36cfa075d08a0a081fb29cf3899a96 (diff)
downloadvim-8e46f7264cc303ae3fd723b2f27badccb1d68fbf.zip
updated for version 7.4a.014
Problem: Test 86 and 89 have a problem with using a shadow dir. Solution: Adjust for the different directory structure. (James McCoy)
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r--src/testdir/test86.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in
index 8b4a4c153..ba3557be3 100644
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -857,8 +857,19 @@ fnamemodify = vim.Function('fnamemodify')
cb.append(fnamemodify('.', ':p:h:t'))
cb.append(vim.eval('@%'))
os.chdir('..')
-cb.append(fnamemodify('.', ':p:h:t'))
-cb.append(vim.eval('@%').replace(os.path.sep, '/'))
+path = fnamemodify('.', ':p:h:t')
+if path != 'src':
+ # Running tests from a shadow directory, so move up another level
+ # This will result in @% looking like shadow/testdir/test86.in, hence the
+ # extra fnamemodify
+ os.chdir('..')
+ cb.append(fnamemodify('.', ':p:h:t'))
+ cb.append(fnamemodify(vim.eval('@%'), ':s?^%s.??' % path).replace(os.path.sep, '/'))
+ os.chdir(path)
+ del path
+else:
+ cb.append(fnamemodify('.', ':p:h:t'))
+ cb.append(vim.eval('@%').replace(os.path.sep, '/'))
os.chdir('testdir')
cb.append(fnamemodify('.', ':p:h:t'))
cb.append(vim.eval('@%'))