Add more tests and move them to a script

This commit is contained in:
mpeterv 2015-12-04 13:44:21 +03:00
parent 042aa8a803
commit fa2e34905b
2 changed files with 31 additions and 13 deletions

View File

@ -2,7 +2,7 @@ language: python
sudo: false
cache:
directories: cache
directories: test/cache
python:
- "2.7"
@ -16,15 +16,4 @@ install:
script:
- pyflakes .
- pep8 . --max-line-length 99 --ignore E302
- python hererocks.py here -l 5.3 -r^ --downloads cache --builds cache
- export PATH=$PATH:$PWD/here/bin
- lua -v
- luarocks --version
- luarocks make
- hererocks-test
- rm here -r
- python hererocks.py here -j 2.1 -r^ --downloads cache --builds cache
- lua -v
- luarocks --version
- luarocks make
- hererocks-test
- ./test.sh

29
test.sh Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -ev
export PATH="$PWD/test/here/bin:$PATH"
HEREROCKS="python hererocks.py test/here --downloads test/cache --builds test/cache"
rm test/here -rf
$HEREROCKS -l^ -r^
lua -v
luarocks --version
luarocks make
hererocks-test | grep "5\.3"
$HEREROCKS -l^ -r^ | grep "already installed"
rm test/here -rf
$HEREROCKS -j 2.1 -r^
lua -v
luarocks --version
luarocks make
hererocks-test | grep "2\.1"
rm test/here -rf
$HEREROCKS -l 5.1 --compat=none
lua -e "assert(not pcall(string.gfind, '', '.'))"
lua -e "(function(...) assert(arg == nil) end)()"
lua -e "assert(math.mod == nil)"
rm test/here -rf
$HEREROCKS -l 5.3 --compat=none
lua -e "assert(module == nil)"