|
@@ -5,6 +5,9 @@ set -o errexit
|
5
|
5
|
SELF_DIR=$(cd $(dirname $0) && pwd) || exit 1
|
6
|
6
|
CDIFF=$SELF_DIR/../cdiff
|
7
|
7
|
|
|
8
|
+# To test with py3k: PYTHON=python3 make test
|
|
9
|
+PYTHON=${PYTHON:-python}
|
|
10
|
+
|
8
|
11
|
function pass()
|
9
|
12
|
{
|
10
|
13
|
if [[ -t 1 ]]; then
|
|
@@ -30,7 +33,7 @@ function cmpOutput()
|
30
|
33
|
local cdiff_opt=${3:-""}
|
31
|
34
|
|
32
|
35
|
echo -n "Test option '$cdiff_opt' with input '$input' ... "
|
33
|
|
- if $CDIFF $cdiff_opt $input 2>/dev/null \
|
|
36
|
+ if $PYTHON $CDIFF $cdiff_opt $input 2>/dev/null \
|
34
|
37
|
| diff -ubq $expected_out - >& /dev/null; then
|
35
|
38
|
pass
|
36
|
39
|
return 0
|