diff --git a/.gitignore b/.gitignore index 45e9481..27ce633 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /README.txt *.pyc *.pyo +/examples/expr.py diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..09bef98 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: python +python: + - "2.7" + - "3.3" + - "3.4" +script: sh test.sh diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..4a9f6e4 --- /dev/null +++ b/test.sh @@ -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