Update test runner script

This commit is contained in:
Junegunn Choi 2014-06-23 12:47:13 +09:00
parent cc37ed48be
commit baf7b18f73
3 changed files with 17 additions and 14 deletions

View file

@ -7,8 +7,10 @@ Test cases for vim-plug
### Run ### Run
```vim ```
:e workflow.vader | Vader ./run
./run !
``` ```
### TODO ### TODO
@ -18,7 +20,6 @@ Test cases for the following features are currently missing:
- Output formatting - Output formatting
- Timeout or interrupt cleaning up git processes - Timeout or interrupt cleaning up git processes
- User prompt in PlugClean command - User prompt in PlugClean command
- Automatic dependency resolution using Plugfile
- Single-threaded installer - Single-threaded installer
- Windows support - Windows support

View file

@ -5,15 +5,18 @@ cd ..
PLUG_SRC=$(pwd)/plug.vim PLUG_SRC=$(pwd)/plug.vim
cd - > /dev/null cd - > /dev/null
export VADER_RTP=$TMPDIR/vader-rtp if [ ! -d vader.vim ]; then
vim -e +Vader -c ':call writefile([fnamemodify(globpath(&rtp, "autoload/vader.vim"), ":h:h")], $VADER_RTP)' +q git clone https://github.com/junegunn/vader.vim.git
fi
MINI_VIMRC=$TMPDIR/mini-vimrc cat > /tmp/mini-vimrc << VIMRC
cat > $MINI_VIMRC << EOF set rtp+=vader.vim
let \$MYVIMRC = '$MINI_VIMRC'
set nocompatible
set rtp=$(cat $VADER_RTP)
source $PLUG_SRC source $PLUG_SRC
EOF VIMRC
if [ "$1" = '!' ]; then
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! workflow.vader' > /dev/null
else
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader workflow.vader'
fi
vim -u $MINI_VIMRC +Vader*

View file

@ -1,5 +1,5 @@
Execute (Initialize test environment): Execute (Initialize test environment):
Save &rtp, g:plug_home, $MYVIMRC Save &rtp, g:plugs, g:plug_home, $MYVIMRC
let vader = fnamemodify(globpath(&rtp, 'autoload/vader.vim'), ':h:h') let vader = fnamemodify(globpath(&rtp, 'autoload/vader.vim'), ':h:h')
let plug = fnamemodify(globpath(&rtp, 'autoload/plug.vim'), ':h:h') let plug = fnamemodify(globpath(&rtp, 'autoload/plug.vim'), ':h:h')
@ -394,4 +394,3 @@ Execute (Cleanup):
delf PlugStatusSorted delf PlugStatusSorted
Restore Restore
source $MYVIMRC