mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-06 09:04:23 +08:00
Change test code to use local repositories
This commit is contained in:
35
test/run
35
test/run
@@ -7,14 +7,29 @@ cd - > /dev/null
|
||||
|
||||
export PLUG_FIXTURES=$(pwd)/fixtures
|
||||
|
||||
if [ ! -d vader.vim ]; then
|
||||
git clone https://github.com/junegunn/vader.vim.git
|
||||
fi
|
||||
clone() {
|
||||
if [ ! -d $2 ]; then
|
||||
git clone $1 $2
|
||||
fi
|
||||
}
|
||||
|
||||
# Clone
|
||||
cd /tmp
|
||||
mkdir -p junegunn vim-scripts jg
|
||||
for repo in vader.vim goyo.vim rust.vim seoul256.vim vim-easy-align vim-fnr \
|
||||
vim-oblique vim-pseudocl vim-redis vim-emoji; do
|
||||
clone https://github.com/junegunn/${repo}.git junegunn/$repo &
|
||||
done
|
||||
clone https://github.com/vim-scripts/beauty256.git vim-scripts/beauty256 &
|
||||
|
||||
rm -rf $PLUG_FIXTURES/fzf
|
||||
if [ ! -d fzf-staged ]; then
|
||||
git clone https://github.com/junegunn/fzf.git $PLUG_FIXTURES/fzf-staged
|
||||
fi
|
||||
clone https://github.com/junegunn/fzf.git $PLUG_FIXTURES/fzf-staged &
|
||||
wait
|
||||
|
||||
(cd junegunn/seoul256.vim &&
|
||||
git checkout no-t_co && git checkout master) > /dev/null 2>&1
|
||||
clone junegunn/vim-emoji jg/vim-emoji
|
||||
cd - > /dev/null
|
||||
|
||||
make_dirs() {
|
||||
mkdir -p "$PLUG_FIXTURES/$1"
|
||||
@@ -52,7 +67,7 @@ DOC
|
||||
}
|
||||
|
||||
cat > /tmp/mini-vimrc << VIMRC
|
||||
set rtp+=vader.vim
|
||||
set rtp+=/tmp/junegunn/vader.vim
|
||||
set shell=/bin/bash
|
||||
source $PLUG_SRC
|
||||
VIMRC
|
||||
@@ -60,10 +75,10 @@ VIMRC
|
||||
[ -z "$TMPDIR" ] && export TMPDIR=/tmp/
|
||||
init
|
||||
if [ "$1" = '!' ]; then
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! workflow.vader' > /dev/null &&
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! test.vader' > /dev/null &&
|
||||
init &&
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! workflow.vader' > /dev/null
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null
|
||||
else
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader workflow.vader'
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader test.vader'
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user