diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-28 09:16:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-28 09:16:02 +0200 |
commit | cf80fd9e02422f90ecb967aacf7a5549246b4689 (patch) | |
tree | acb108cc2ba8db1048e2fbbbd68595c9bc5bd251 /test/functional/options/defaults_spec.lua | |
parent | 070d9261b69364b0692a35c4b78b408562265ce1 (diff) | |
parent | 769f44e918c61023a3a01dc238a881049f4c6649 (diff) | |
download | rneovim-cf80fd9e02422f90ecb967aacf7a5549246b4689.tar.gz rneovim-cf80fd9e02422f90ecb967aacf7a5549246b4689.tar.bz2 rneovim-cf80fd9e02422f90ecb967aacf7a5549246b4689.zip |
Merge #9911 from justinmk/win-site-data
win/defaults: Use "…/nvim-data/site" in 'runtimepath'
Diffstat (limited to 'test/functional/options/defaults_spec.lua')
-rw-r--r-- | test/functional/options/defaults_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua index 3d019d3047..0fc2876d00 100644 --- a/test/functional/options/defaults_spec.lua +++ b/test/functional/options/defaults_spec.lua @@ -1,4 +1,5 @@ local helpers = require('test.functional.helpers')(after_each) +local global_helpers = require('test.helpers') local Screen = require('test.functional.ui.screen') @@ -15,6 +16,7 @@ local neq = helpers.neq local mkdir = helpers.mkdir local rmdir = helpers.rmdir local alter_slashes = helpers.alter_slashes +local table_contains = global_helpers.table_contains describe('startup defaults', function() describe(':filetype', function() @@ -250,6 +252,23 @@ describe('XDG-based defaults', function() -- Need separate describe() blocks to not run clear() twice. -- Do not put before_each() here for the same reasons. + it("&runtimepath data-dir matches stdpath('data') #9910", function() + clear() + local rtp = eval('split(&runtimepath, ",")') + local rv = {} + local expected = (iswin() + and { [[\nvim-data\site]], [[\nvim-data\site\after]], } + or { '/nvim/site', '/nvim/site/after', }) + + for _,v in ipairs(rtp) do + local m = string.match(v, [=[[/\]nvim[^/\]*[/\]site.*$]=]) + if m and not table_contains(rv, m) then + table.insert(rv, m) + end + end + eq(expected, rv) + end) + describe('with empty/broken environment', function() it('sets correct defaults', function() clear({env={ |