diff --git a/test/README.md b/test/README.md index e34a96d..ad19578 100644 --- a/test/README.md +++ b/test/README.md @@ -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 diff --git a/test/run b/test/run index 52aee18..a8098ee 100755 --- a/test/run +++ b/test/run @@ -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* diff --git a/test/workflow.vader b/test/workflow.vader index 688a33f..237a73a 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -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