Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove user's after directory from &runtimepath

  • Loading branch information...
commit 68c6e033eadee4b3f255e3f6e30824eab882df4b 1 parent d696b58
Kana Natsuno authored
Showing with 19 additions and 1 deletion.
  1. +1 −1  bin/vspec
  2. +18 −0 t/runtimepath.vim
2  bin/vspec
View
@@ -39,7 +39,7 @@ unset args[$((${#args[@]}- 1))] # Now holds all {non-standard-runtimepath}s.
cat <<END >"$driver_script"
function s:main()
- let standard_paths = split(&runtimepath, ',')[1:-1]
+ let standard_paths = split(&runtimepath, ',')[1:-2]
let non_standard_paths = reverse(['$(echo "${args[@]}" |
sed "s/ */', '/g")'])
let all_paths = copy(standard_paths)
18 t/runtimepath.vim
View
@@ -0,0 +1,18 @@
+describe 'bin/vspec'
+ it 'should remove user''s directory from the default &runtimepath'
+ let current_runtimepath = &runtimepath
+ set runtimepath&
+ let default_runtimepath = &runtimepath
+ let &runtimepath = current_runtimepath
+
+ let cs = split(current_runtimepath, ',')
+ let ds = split(default_runtimepath, ',')
+ let n = (len(cs) - (len(ds) - 2)) / 2
+
+ for i in range(len(ds) - 2)
+ Expect cs[n + i] ==# ds[1 + i]
+ endfor
+ Expect stridx(ds[0], $HOME) != -1
+ Expect stridx(ds[-1], $HOME) != -1
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.