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

View File

@ -5,15 +5,18 @@ cd ..
PLUG_SRC=$(pwd)/plug.vim
cd - > /dev/null
export VADER_RTP=$TMPDIR/vader-rtp
vim -e +Vader -c ':call writefile([fnamemodify(globpath(&rtp, "autoload/vader.vim"), ":h:h")], $VADER_RTP)' +q
if [ ! -d vader.vim ]; then
git clone https://github.com/junegunn/vader.vim.git
fi
MINI_VIMRC=$TMPDIR/mini-vimrc
cat > $MINI_VIMRC << EOF
let \$MYVIMRC = '$MINI_VIMRC'
set nocompatible
set rtp=$(cat $VADER_RTP)
cat > /tmp/mini-vimrc << VIMRC
set rtp+=vader.vim
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):
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 plug = fnamemodify(globpath(&rtp, 'autoload/plug.vim'), ':h:h')
@ -394,4 +394,3 @@ Execute (Cleanup):
delf PlugStatusSorted
Restore
source $MYVIMRC