1#!/bin/bash 2 3[ -f testing.sh ] && . testing.sh 4 5#testcmd "name "args" "result" "infile" "stdin" 6 7BDIR="$FILES/bc" 8TESTDIR="./" 9 10run_bc_test() { 11 tst="$1" 12 results=$(cat "$BDIR/${tst}_results.txt") 13 testcmd "$tst" "-l $BDIR/$tst.txt" "$results\n" "$BDIR/$tst.txt" "" 14} 15 16run_bc_test decimal 17run_bc_test add 18run_bc_test subtract 19run_bc_test multiply 20run_bc_test divide 21run_bc_test modulus 22run_bc_test power 23run_bc_test sqrt 24run_bc_test vars 25run_bc_test boolean 26run_bc_test parse 27run_bc_test print 28run_bc_test exponent 29run_bc_test log 30run_bc_test pi 31run_bc_test arctan 32run_bc_test sine 33run_bc_test cosine 34run_bc_test bessel 35run_bc_test arrays 36run_bc_test misc 37run_bc_test misc1 38run_bc_test misc2 39 40testcmd "stdin" "" "2\n" "" "1+1\n" 41