#!/bin/bash # # Usage: # ./opy.sh set -o nounset set -o pipefail set -o errexit source test/common.sh # Can't be readonly because we override it below? Gah. #readonly OPYC=${OPYC:-bin/opyc} OPYC=${OPYC:-bin/opyc} readonly TMP_DIR=_tmp/opy-test mkdir -p $TMP_DIR usage() { set +o errexit bin/opy_.py test $? -eq 2 || fail bin/opy_.py --version test $? -eq 0 || fail #bin/opy #test $? -eq 2 || fail bin/opyc test $? -eq 2 || fail bin/opyc invalid test $? -eq 2 || fail # TODO: --help, --version everywhere. #bin/opy_.py --help #test $? -eq 0 || fail #bin/opy --help #test $? -eq 0 || fail #bin/opy --version #test $? -eq 0 || fail bin/opyc --help test $? -eq 0 || fail #bin/opyc --version #test $? -eq 0 || fail } parse() { cat >$TMP_DIR/hello.py <$TMP_DIR/loop.py < out.txt diff out.txt - <