Test refactoring

This commit is contained in:
Junegunn Choi
2015-05-28 19:03:49 +09:00
parent 50cd5e5819
commit f85d4d774b
6 changed files with 131 additions and 127 deletions

View File

@@ -19,7 +19,7 @@ Execute (#112 On-demand loading should not suppress messages from ftplugin):
**********************************************************************
Execute (#114 Should not contain empty path in &rtp):
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
call plug#end()
Log &rtp
@@ -35,7 +35,7 @@ Execute (#130 Proper cleanup of on-demand loading triggers):
" Cleared on command
call ReloadPlug()
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'junegunn/vim-emoji', { 'on': ['EmojiCommand', 'EmojiCommand2', '<Plug>(EmojiMapping)'] }
call plug#end()
PlugInstall | q
@@ -52,7 +52,7 @@ Execute (#130 Proper cleanup of on-demand loading triggers):
" Cleared on FileType
call ReloadPlug()
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'junegunn/vim-emoji', { 'on': ['EmojiCommandExtra', '<Plug>(EmojiMappingExtra)'], 'for': ['emoji'] }
call plug#end()
@@ -78,13 +78,13 @@ Execute (#131 Syntax error):
**********************************************************************
Execute (#139-1 Using new remote branch):
" Make sure to remove the clone
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
call plug#end()
PlugClean!
" Install master branch
call plug#begin('$TMPDIR/plugged')
Plug expand('file:///$TMPDIR/new-branch')
call plug#begin('/tmp/plugged')
Plug expand('file:////tmp/new-branch')
call plug#end()
PlugUpdate
@@ -95,14 +95,14 @@ Execute (#139-1 Using new remote branch):
Assert !exists('g:baz'), 'g:baz should not be found'
" Create a new branch on origin
call system('cd $TMPDIR/new-branch && git checkout -b new &&'
call system('cd /tmp/new-branch && git checkout -b new &&'
\. 'echo "let g:bar = 1" > plugin/bar.vim && git add plugin/bar.vim &&'
\. 'git commit -m second')
" We're setting up two plugins so that parallel installer is used
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'junegunn/seoul256.vim'
Plug expand('file:///$TMPDIR/new-branch'), { 'branch': 'new' }
Plug expand('file:////tmp/new-branch'), { 'branch': 'new' }
call plug#end()
PlugUpdate
silent %y
@@ -125,14 +125,14 @@ Expect:
Execute (#139-2 Using yet another new remote branch):
" Create another branch on origin
call system('cd $TMPDIR/new-branch && git checkout master &&'
call system('cd /tmp/new-branch && git checkout master &&'
\. 'git checkout -b brand-new &&'
\. 'echo "let g:baz = 1" > plugin/baz.vim && git add plugin/baz.vim &&'
\. 'git commit -m third')
" Test Vim installer here
call plug#begin('$TMPDIR/plugged')
Plug expand('file:///$TMPDIR/new-branch'), { 'branch': 'brand-new' }
call plug#begin('/tmp/plugged')
Plug expand('file:////tmp/new-branch'), { 'branch': 'brand-new' }
call plug#end()
PlugUpdate
silent %y
@@ -154,19 +154,19 @@ Expect:
Execute (#139-3 Should fail when not possible to fast-forward):
" Commit on cloned repo
call system('cd $TMPDIR/plugged/new-branch && git checkout master &&'
call system('cd /tmp/plugged/new-branch && git checkout master &&'
\. 'touch foobar && git add foobar && git commit -m foobar')
" Different commit on remote
call system('cd $TMPDIR/new-branch && git checkout master &&'
call system('cd /tmp/new-branch && git checkout master &&'
\. 'touch foobaz && git add foobaz && git commit -m foobaz')
for multi in [0, 1]
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
if multi
Plug 'junegunn/seoul256.vim'
endif
Plug expand('file:///$TMPDIR/new-branch')
Plug expand('file:////tmp/new-branch')
call plug#end()
PlugUpdate
silent %y
@@ -210,7 +210,7 @@ Execute (#159: shell=/bin/tcsh):
let org = &shell
try
set shell=/bin/tcsh
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'junegunn/seoul256.vim'
call plug#end()
@@ -224,7 +224,7 @@ Execute (#159: shell=/bin/tcsh):
**********************************************************************
Execute (#154: Spaces in &rtp should not be escaped):
call plug#begin('$TMPDIR/plug it')
call plug#begin('/tmp/plug it')
Plug 'seoul256 vim'
call plug#end()
Log &rtp
@@ -232,7 +232,7 @@ Execute (#154: Spaces in &rtp should not be escaped):
**********************************************************************
Execute (#184: Duplicate entries in &rtp):
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'plugin1'
\| Plug 'plugin0'
@@ -250,7 +250,7 @@ Execute (#236: Plugin removed from &rtp when .vimrc is reloaded):
silent! delc EasyAlign
call ReloadPlug()
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' }
call plug#end()
PlugInstall | q
@@ -259,7 +259,7 @@ Execute (#236: Plugin removed from &rtp when .vimrc is reloaded):
%EasyAlign=
Assert &rtp =~ '/vim-easy-align', 'Plugin should be in &rtp'
call plug#begin('$TMPDIR/plugged')
call plug#begin('/tmp/plugged')
Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' }
call plug#end()
Assert &rtp =~ '/vim-easy-align', 'Plugin should still be in &rtp'