Add a test script and a YML file for travis-CI
This commit is contained in:
parent
b2fef34742
commit
aa6aec7d86
3 changed files with 23 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@
|
||||||
/README.txt
|
/README.txt
|
||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
|
/examples/expr.py
|
||||||
|
|
|
||||||
6
.travis.yml
Normal file
6
.travis.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- "2.7"
|
||||||
|
- "3.3"
|
||||||
|
- "3.4"
|
||||||
|
script: sh test.sh
|
||||||
16
test.sh
Normal file
16
test.sh
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
trap 'echo ERROR' 0
|
||||||
|
|
||||||
|
export PYTHONPATH=$(pwd)
|
||||||
|
for PY_G in python python3 ; do
|
||||||
|
$PY_G ./yapps2 examples/expr.g examples/expr.py
|
||||||
|
|
||||||
|
for PY_X in python python3 ; do
|
||||||
|
test "$(echo "1+2*3+4" | $PY_X examples/expr.py goal)" = 11
|
||||||
|
done
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
trap 'rm examples/expr.py; echo OK' 0
|
||||||
Loading…
Reference in a new issue