aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-02-03 02:18:22 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-02-04 11:07:49 +0100
commitbbfdb84ae14d11dfcf2f28a09f03fdbadc2f5bd2 (patch)
treeb6b757e95035cbb0f337930ad8f2d085ccaae8ea
parent611411bf85e05a3bf0b813c4db15c6bb4d0127ba (diff)
downloadrneovim-bbfdb84ae14d11dfcf2f28a09f03fdbadc2f5bd2.tar.gz
rneovim-bbfdb84ae14d11dfcf2f28a09f03fdbadc2f5bd2.tar.bz2
rneovim-bbfdb84ae14d11dfcf2f28a09f03fdbadc2f5bd2.zip
build: Do not force busted into front of $PATH
This was a workaround from long ago, but it doesn't seem to be needed anymore. And it breaks the $PATH on the Windows build (AppVeyor CI). After this change python3 (and 2) is correctly detected on AppVeyor CI. References #5946
-rw-r--r--cmake/RunTests.cmake3
-rw-r--r--test/unit/os/fs_spec.lua15
2 files changed, 5 insertions, 13 deletions
diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake
index 58f19b6fa5..19aaf85d0f 100644
--- a/cmake/RunTests.cmake
+++ b/cmake/RunTests.cmake
@@ -1,6 +1,3 @@
-get_filename_component(BUSTED_DIR ${BUSTED_PRG} PATH)
-set(ENV{PATH} "${BUSTED_DIR}:$ENV{PATH}")
-
set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime)
set(ENV{NVIM_RPLUGIN_MANIFEST} ${WORKING_DIR}/Xtest_rplugin_manifest)
set(ENV{XDG_CONFIG_HOME} ${WORKING_DIR}/Xtest_xdg/config)
diff --git a/test/unit/os/fs_spec.lua b/test/unit/os/fs_spec.lua
index 5d889d6e33..516fb5a7d1 100644
--- a/test/unit/os/fs_spec.lua
+++ b/test/unit/os/fs_spec.lua
@@ -23,7 +23,7 @@ cimport('./src/nvim/os/shell.h')
cimport('./src/nvim/option_defs.h')
cimport('./src/nvim/main.h')
cimport('./src/nvim/fileio.h')
-local fs = cimport('./src/nvim/os/os.h')
+local fs = cimport('./src/nvim/os/os.h', './src/nvim/path.h')
cppimport('sys/stat.h')
cppimport('fcntl.h')
cppimport('uv-errno.h')
@@ -77,11 +77,9 @@ describe('fs function', function()
lfs.link('test.file', 'unit-test-directory/test_link.file', true)
lfs.link('non_existing_file.file', 'unit-test-directory/test_broken_link.file', true)
- -- Since the tests are executed, they are called by an executable. We use
- -- that executable for several asserts.
+ -- The tests are invoked with an absolute path to `busted` executable.
absolute_executable = arg[0]
- -- Split absolute_executable into a directory and the actual file name for
- -- later usage.
+ -- Split the absolute_executable path into a directory and filename.
directory, executable_name = string.match(absolute_executable, '^(.*)/(.*)$')
end)
@@ -194,11 +192,8 @@ describe('fs function', function()
end)
it('returns the absolute path when given an executable inside $PATH', function()
- -- Since executable_name does not start with "./", the path will be
- -- selected from $PATH. Make sure the ends match, ignore the directories.
- local _, busted = string.match(absolute_executable, '^(.*)/(.*)$')
- local _, name = string.match(exe(executable_name), '^(.*)/(.*)$')
- eq(busted, name)
+ local fullpath = exe('ls')
+ eq(1, fs.path_is_absolute_path(to_cstr(fullpath)))
end)
it('returns the absolute path when given an executable relative to the current dir', function()