Newer
Older
dub_jkp / test / 5-convert-stdout.sh
@Martin Nowak Martin Nowak on 4 Jul 2017 416 bytes replace all usages of `exit`
  1. #!/usr/bin/env bash
  2.  
  3. . $(dirname "${BASH_SOURCE[0]}")/common.sh
  4.  
  5. cd ${CURR_DIR}/1-exec-simple
  6.  
  7. EXPECTED="name \"exec-simple\"
  8. targetType \"executable\""
  9.  
  10. RESULT=`${DUB} convert -s -f sdl`
  11.  
  12. if [ ! -f dub.json ]; then
  13. die $LINENO 'Package recipe got modified!'
  14. fi
  15.  
  16. if [ -f dub.sdl ]; then
  17. die $LINENO 'An SDL recipe got written.'
  18. fi
  19.  
  20. if [ "$RESULT" != "$EXPECTED" ]; then
  21. die $LINENO 'Unexpected SDLang output.'
  22. fi