aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-08-08 18:19:26 -0400
committerJames McCoy <jamessan@jamessan.com>2016-08-08 18:19:26 -0400
commit84bf53b8034e398960c1356b4c8114bcc71cbff1 (patch)
tree7ba650f7e93eb60af15e754b1708befe425b260f /test
parentabb0928dfbf71d5358b56e888db9ed8ff66d8933 (diff)
downloadrneovim-84bf53b8034e398960c1356b4c8114bcc71cbff1.tar.gz
rneovim-84bf53b8034e398960c1356b4c8114bcc71cbff1.tar.bz2
rneovim-84bf53b8034e398960c1356b4c8114bcc71cbff1.zip
Set the default value for 'packpath'
As noted in “:help 'packpath'”, the default value is supposed to be the same as that for 'runtimepath'. This was missed in the original port of the packages functionality from Vim. Closes #5193
Diffstat (limited to 'test')
-rw-r--r--test/functional/options/defaults_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua
index 8eec6ad8bf..a131f72cf6 100644
--- a/test/functional/options/defaults_spec.lua
+++ b/test/functional/options/defaults_spec.lua
@@ -7,6 +7,7 @@ local execute = helpers.execute
local clear = helpers.clear
local eval = helpers.eval
local eq = helpers.eq
+local neq = helpers.neq
local function init_session(...)
local args = { helpers.nvim_prog, '-i', 'NONE', '--embed',
@@ -80,6 +81,19 @@ describe('startup defaults', function()
eq(0, eval('exists("g:syntax_on")'))
end)
end)
+
+ describe('packpath', function()
+ it('defaults to &runtimepath', function()
+ eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
+ end)
+
+ it('does not follow modifications to runtimepath', function()
+ meths.command('set runtimepath+=foo')
+ neq(meths.get_option('runtimepath'), meths.get_option('packpath'))
+ meths.command('set packpath+=foo')
+ eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
+ end)
+ end)
end)
describe('XDG-based defaults', function()