diff --git a/test/test.sh b/test/test.sh index ae49888..b8c1e86 100755 --- a/test/test.sh +++ b/test/test.sh @@ -30,13 +30,14 @@ test() { sleep 5 done - DOCKER_OUTPUT=`docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli test/$1" | tr -d '\n'` + DOCKER_OUTPUT=`docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli test/$1" | xargs` + EXPECTED_OUTPUT=`echo "$2" | xargs` - if [ "${DOCKER_OUTPUT}" = "$2" ]; then + if [ "${DOCKER_OUTPUT}" = "${EXPECTED_OUTPUT}" ]; then echo "Test passed: $1" else echo "Failed to run test: $1" - echo "Expected output was: $2" + echo "Expected output was: ${EXPECTED_OUTPUT}" echo "Test output was: ${DOCKER_OUTPUT}" exit 1 fi