mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-19 02:25:35 -07:00
Update test runner script
This commit is contained in:
parent
cc37ed48be
commit
baf7b18f73
@ -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
|
||||
|
||||
|
21
test/run
21
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*
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user