test,Travis: Made test-suite working, attached to Travis CI

This commit is contained in:
Sebastian Gniazdowski 2017-11-17 13:44:25 +01:00
parent b6a4d1c5c1
commit 2355e2b1a0
5 changed files with 15 additions and 2 deletions

6
.gitignore vendored
View file

@ -73,7 +73,13 @@ zmodules/Src/zdharma/errnames.c
zmodules/Src/zdharma/errcount.h
zmodules/Src/zdharma/curses_keys.h
test/test_plugins/zsh-select/.git
var
*.zwc
answer
test/data
test/zplugin*.zsh
test/_zplugin
*.txt
*.zini
.ycm_extra_conf.py

View file

@ -25,6 +25,7 @@ before_script:
zsh -c 'print -rl -- "ZSH_VERSION: $ZSH_VERSION" "ZSH_PATCHLEVEL: $ZSH_PATCHLEVEL" "OSTYPE: $OSTYPE" "CPUTYPE: $CPUTYPE" "MACHTYPE: $MACHTYPE"'
script:
- make
- make test
- make -C zsdoc pdf
- share/deploy_doc.sh

View file

@ -1,6 +1,6 @@
all: test
test: test1 test2 test3
test: test1
prepare: ../zplugin.zsh ../zplugin-side.zsh ../zplugin-install.zsh ../zplugin-autoload.zsh
cp ../zplugin.zsh ../zplugin-side.zsh ../zplugin-install.zsh ../zplugin-autoload.zsh ../_zplugin .

1
test/_test1/plugins Normal file
View file

@ -0,0 +1 @@
zsh-select

View file

@ -6,7 +6,7 @@ emulate -LR zsh -o warncreateglobal -o typesetsilent -o extendedglob
[[ -d $PWD/$1/answer ]] && rm -rf $PWD/$1/answer
# Setup paths and load Zplugin
local REPLY
local REPLY p
local -a reply
local -A ZPLGM
ZPLGM[BIN_DIR]=$PWD
@ -44,6 +44,11 @@ internet_mock_git() {
builtin cd "$1"
[[ -n "$3" ]] && typeset -g DBG=1 # $(DEBUG)
[[ -n "$4" ]] && { autoload allopt; allopt > allopt.txt; } # $(OPTDUMP)
local -a plugins
[[ -f "plugins" ]] && plugins=( "${(@f)"$(<./plugins)"}" )
for p in "${plugins[@]}"; do
[[ ! -e ../test_plugins/$p/.git ]] && command ln -svf .test_git ../test_plugins/$p/.git
done
command rm -f skip
builtin source ./script