Junegunn Choi 11 лет назад
Родитель
Сommit
eb38fe3d32
2 измененных файлов с 6 добавлено и 0 удалено
  1. 1 0
      test/run
  2. 5 0
      test/workflow.vader

+ 1 - 0
test/run

@@ -55,6 +55,7 @@ set shell=/bin/bash
 source $PLUG_SRC
 VIMRC
 
+[ -z "$TMPDIR" ] && export TMPDIR=/tmp
 init
 if [ "$1" = '!' ]; then
   /usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! workflow.vader' > /dev/null &&

+ 5 - 0
test/workflow.vader

@@ -1036,6 +1036,11 @@ Execute (PlugSnapshot):
   AssertEqual 'PLUG_HOME=$TMPDIR/plugged', getline(7)
   AssertEqual 0, stridx(getline(9), 'cd $PLUG_HOME/seoul256.vim/ && git reset --hard')
   AssertEqual 0, stridx(getline(10), 'cd $PLUG_HOME/vim-emoji/ && git reset --hard')
+  AssertEqual 'sh', &filetype
+
+  execute 'PlugSnapshot' g:plug_home.'/snapshot.sh'
+  AssertEqual 'sh', &filetype
+  AssertEqual 'snapshot.sh', fnamemodify(expand('%'), ':t')
   q
 
 Execute (Cleanup):