aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds
diff options
context:
space:
mode:
authorRom Grk <romgrk.cc@gmail.com>2020-11-03 03:11:08 -0500
committerRom Grk <romgrk.cc@gmail.com>2020-11-03 03:11:08 -0500
commit13e0ca3e194a438383b8451e19090355aa6c29dc (patch)
tree0ac33ef5ac829b7c74dd15f34b17540c3186c356 /test/functional/ex_cmds
parentc7c865214655f7d88fde85ed4947f07319c14182 (diff)
parent5b5848f2fb1f4b7995bb8a59d94b6766d2182070 (diff)
downloadrneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.tar.gz
rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.tar.bz2
rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.zip
Merge branch 'master' into add-scroll-events
Diffstat (limited to 'test/functional/ex_cmds')
-rw-r--r--test/functional/ex_cmds/packadd_spec.lua74
1 files changed, 0 insertions, 74 deletions
diff --git a/test/functional/ex_cmds/packadd_spec.lua b/test/functional/ex_cmds/packadd_spec.lua
deleted file mode 100644
index 2b0810cf9b..0000000000
--- a/test/functional/ex_cmds/packadd_spec.lua
+++ /dev/null
@@ -1,74 +0,0 @@
-local helpers = require('test.functional.helpers')(after_each)
-
-local clear = helpers.clear
-local eq = helpers.eq
-local exec_lua = helpers.exec_lua
-
-describe('packadd', function()
- before_each(function()
- -- Primarily taken from test/functional/legacy/packadd_spec.lua
- clear()
- exec_lua [[
- TopDirectory = vim.fn.expand(vim.fn.getcwd() .. '/Xdir_lua')
- PlugDirectory = TopDirectory .. '/pack/mine/opt/mytest'
-
- vim.o.packpath = TopDirectory
-
- function FindPathsContainingDir(dir)
- return vim.fn.filter(
- vim.split(package.path, ';'),
- function(k, v)
- return string.find(v, 'mytest') ~= nil
- end
- )
- end
- ]]
- end)
-
- after_each(function()
- exec_lua [[
- vim.fn.delete(TopDirectory, 'rf')
- ]]
- end)
-
- it('should immediately update package.path in lua', function()
- local count_of_paths = exec_lua [[
- vim.fn.mkdir(PlugDirectory .. '/lua/', 'p')
-
- local num_paths_before = #FindPathsContainingDir('mytest')
-
- vim.cmd("packadd mytest")
-
- local num_paths_after = #FindPathsContainingDir('mytest')
-
- return { num_paths_before, num_paths_after }
- ]]
-
- eq({0, 2}, count_of_paths)
- end)
-
- it('should immediately update package.path in lua even if lua directory does not exist', function()
- local count_of_paths = exec_lua [[
- vim.fn.mkdir(PlugDirectory .. '/plugin/', 'p')
-
- local num_paths_before = #FindPathsContainingDir('mytest')
-
- vim.cmd("packadd mytest")
-
- local num_paths_after = #FindPathsContainingDir('mytest')
-
- return { num_paths_before, num_paths_after }
- ]]
-
- eq({0, 2}, count_of_paths)
- end)
-
- it('should error for invalid paths', function()
- local count_of_paths = exec_lua [[
- local ok, err = pcall(vim.cmd, "packadd asdf")
- return ok
- ]]
-
- eq(false, count_of_paths)
- end)
-end)