File: test.sh

package info (click to toggle)
yapps2 2.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: python: 1,016; sh: 24; makefile: 13
file content (16 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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