1#!/bin/sh23TMSIM="${TMSIM:-$(pwd)/../../../tmsim}"4if [ ! -x "${TMSIM}" ]; then5 echo "Couldn't find tmsim executable: '${TMSIM}'" 1>&26 exit 17fi89exitstatus=01011for test in *.csv; do12 tmsimfile="${test%%.csv}.tm"1314 printf "\n"1516 while read -r line; do17 input="$(echo "${line}" | cut -d ',' -f1)"18 output="$(echo "${line}" | cut -d ',' -f2)"1920 echo "Testing '${test##*/}' with input '${input}':"21 result=$(${TMSIM} -r "${tmsimfile}" "${input}" | tr -d \$)2223 if [ "${result}" = "${output}" ]; then24 printf "\tOK.\n"25 else26 exitstatus=127 printf "\tFAIL: Expected '${output}', got '${result}'.\n"28 fi29 done < "${test}"30done3132exit ${exitstatus}