Permalink
Browse files

Added tests that check for issue #54

  • Loading branch information...
1 parent 056907c commit 9c4a250bb7af58c75cc14553e35eb115697726f0 @ZyX-I ZyX-I committed Nov 5, 2011
Showing with 31 additions and 1 deletion.
  1. +1 −0 test/activate-mhg.ok
  2. +1 −0 test/activate-mis.ok
  3. +7 −0 test/files-mhg.lst
  4. +10 −0 test/files-mis.lst
  5. +9 −0 test/gentests-test-repos.zsh
  6. +3 −1 test/vimrc
View
1 test/activate-mhg.ok
@@ -0,0 +1 @@
+::: In plugin {rtp}/plugin/rtp.vim
View
1 test/activate-mis.ok
@@ -0,0 +1 @@
+::: In plugin {rtp}/plugin/rtp.vim
View
7 test/files-mhg.lst
@@ -0,0 +1,7 @@
+./vam_test_mhg
+./vam_test_mhg/addon-info.json
+./vam_test_mhg/plugin
+./vam_test_mhg/plugin/rtp.vim
+./vam_test_mhg/rtp
+./vam_test_mhg/rtp/plugin
+./vam_test_mhg/rtp/plugin/rtp.vim
View
10 test/files-mis.lst
@@ -0,0 +1,10 @@
+./vam_test_mis
+./vam_test_mis/addon-info.json
+./vam_test_mis/archive
+./vam_test_mis/archive/vam_test_mis.tar.bz2
+./vam_test_mis/plugin
+./vam_test_mis/plugin/rtp.vim
+./vam_test_mis/rtp
+./vam_test_mis/rtp/plugin
+./vam_test_mis/rtp/plugin/rtp.vim
+./vam_test_mis/version
View
9 test/gentests-test-repos.zsh
@@ -35,6 +35,7 @@ typeset -a TESTS
(( ISWINE )) || TESTS+=( git bzr )
(( ISWINE )) && sed -r -i -e 's:/:\\:g' files-*.lst
TESTS+=( hg svn tar tgz tgz2 tbz tbz2 zip vba vmb vgz vbz archive_name )
+TESTS+=( mis mhg )
for t in $TESTS ; do
local ANAME=vam_test_$t
#▶2 activate
@@ -43,6 +44,14 @@ cat > activate-$t.in <<EOF
:call WriteGlob()
EOF
addtofile activate-$t.ok init.ok files-$t.lst
+#▶2 activate-vimrc
+cat > activate-vimrc-$t.vim << EOF
+call vam#ActivateAddons("$ANAME")
+EOF
+cat > activate-vimrc-$t.in << EOF
+:call WriteGlob()
+EOF
+cp activate-$t.ok activate-vimrc-$t.ok
#▶2 install
cat > install-$t.in <<EOF
:runtime! autoload/vam.vim
View
4 test/vimrc
@@ -32,6 +32,7 @@ function WriteFile(...)
call writefile(r, s:outfile, 'b')
return ''
endfunction
+command -bar -nargs=1 W :call WriteFile(<q-args>)
function WriteGlob()
cd `="vam-".g:curtest`
call WriteFile(split(glob('./**'), "\n"))
@@ -49,6 +50,7 @@ function Try(cmd)
endif
endtry
endfunction
+command -nargs=1 Try :call Try(<q-args>)
if filereadable(g:curtest.'.vim')
- source `=g:curtests.".vim"`
+ source `=g:curtest.".vim"`
endif

0 comments on commit 9c4a250

Please sign in to comment.