Add test case for g:plug_shallow
This commit is contained in:
parent
80ca4ebf54
commit
6677e8bffd
|
@ -170,6 +170,7 @@ Execute (#139-3 Should fail when not possible to fast-forward):
|
||||||
silent %y
|
silent %y
|
||||||
Assert @" =~ 'Not possible to fast-forward', @"
|
Assert @" =~ 'Not possible to fast-forward', @"
|
||||||
endfor
|
endfor
|
||||||
|
q
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
Execute (#145: Merging on-demand loading triggers - cmd):
|
Execute (#145: Merging on-demand loading triggers - cmd):
|
||||||
|
|
|
@ -1089,10 +1089,29 @@ Execute (#221 Shallow-clone and tag option):
|
||||||
|
|
||||||
Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' }
|
Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' }
|
||||||
PlugUpdate
|
PlugUpdate
|
||||||
|
q
|
||||||
|
|
||||||
Assert len(split(system('git log --oneline'), '\n')) > 1
|
Assert len(split(system('git log --oneline'), '\n')) > 1
|
||||||
Assert system('git describe --tag') =~ '^1.5.3'
|
Assert system('git describe --tag') =~ '^1.5.3'
|
||||||
Assert !filereadable('.git/shallow')
|
Assert !filereadable('.git/shallow')
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
Execute (#221 Shallow-clone disabled by g:plug_shallow = 0):
|
||||||
|
call plug#begin(temp_plugged)
|
||||||
|
call plug#end()
|
||||||
|
PlugClean!
|
||||||
|
|
||||||
|
let g:plug_shallow = 0
|
||||||
|
call plug#begin(temp_plugged)
|
||||||
|
Plug 'junegunn/goyo.vim'
|
||||||
|
call plug#end()
|
||||||
|
PlugInstall
|
||||||
q
|
q
|
||||||
|
|
||||||
|
execute 'cd' g:plugs['goyo.vim'].dir
|
||||||
|
Assert len(split(system('git log --oneline'), '\n')) > 1, 'not shallow'
|
||||||
|
Assert !filereadable('.git/shallow'), 'not shallow'
|
||||||
|
cd -
|
||||||
|
Then:
|
||||||
|
unlet g:plug_shallow
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user