#! /bin/bash function finish { echo "Cleaning up..." ps -p $PID > /dev/null if [[ "$?" == "0" ]]; then kill -9 $PID fi } trap finish EXIT # Make sure the tmsp cli can connect to the dummy echo "Dummy test ..." dummy &> /dev/null & PID=`echo $!` sleep 1 RESULT_HASH=`tmsp-cli get_hash` if [[ "$RESULT_HASH" != "" ]]; then echo "Expected nothing but got: $RESULT_HASH" exit 1 fi echo "... Pass!" echo "" # Add a tx, get hash, get hash # hashes should be non-empty and identical echo "Dummy batch test ..." OUTPUT=`(tmsp-cli batch) <