diff --git a/test/5-convert-stdout.sh b/test/5-convert-stdout.sh new file mode 100755 index 0000000..86cba02 --- /dev/null +++ b/test/5-convert-stdout.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +cd ${CURR_DIR}/1-exec-simple + +EXPECTED="name \"exec-simple\" +targetType \"executable\"" + +RESULT=`${DUB} convert -s -f sdl` + +if [ ! -f dub.json ]; then + echo "Package recipe got modified!" + exit 1 +fi + +if [ -f dub.sdl ]; then + echo "An SDL recipe got written." + exit 2 +fi + +if [ "$RESULT" != "$EXPECTED" ]; then + echo "Unexpected SDLang output." + exit 3 +fi