Fix #154 - issues with paths containing spaces

This commit is contained in:
Junegunn Choi
2015-02-12 11:35:05 +09:00
parent 7aeff0ef0d
commit ef784c17b1
2 changed files with 12 additions and 10 deletions

View File

@@ -1008,21 +1008,22 @@ Execute (PlugClean should not try to remove unmanaged plugins inside g:plug_home
q
**********************************************************************
Execute (PlugSnapshot):
call plug#begin('$TMPDIR/plugged')
Plug 'junegunn/vim-emoji'
Execute (PlugSnapshot / #154 issues with paths containing spaces):
call plug#begin('$TMPDIR/plug with spaces')
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/seoul256.vim'
call plug#end()
PlugClean!
PlugInstall
call plug#load('vim-easy-align') " Should properly hand paths with spaces
PlugSnapshot
AssertEqual '#!/bin/sh', getline(1)
AssertEqual '# Generated by vim-plug', getline(2)
AssertEqual 'vim +PlugUpdate +qa', getline(5)
AssertEqual 'PLUG_HOME=$TMPDIR/plugged', getline(7)
AssertEqual 'PLUG_HOME=$TMPDIR/plug\ with\ spaces', getline(7)
AssertEqual 0, stridx(getline(9), 'cd $PLUG_HOME/seoul256.vim/ && git reset --hard')
AssertEqual 0, stridx(getline(10), 'cd $PLUG_HOME/vim-emoji/ && git reset --hard')
AssertEqual 0, stridx(getline(10), 'cd $PLUG_HOME/vim-easy-align/ && git reset --hard')
AssertEqual 'sh', &filetype
execute 'PlugSnapshot' g:plug_home.'/snapshot.sh'