Newer
Older
dub_jkp / test / 0-init-fail.sh
@Martin Nowak Martin Nowak on 13 Apr 2015 299 bytes directly run the dub init test scripts
  1. #!/bin/bash
  2.  
  3. packname="0-init-fail-pack"
  4. deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist...
  5.  
  6. $DUB init $packname $deps
  7.  
  8. function cleanup {
  9. rm -rf $packname
  10. }
  11.  
  12. if [ -e $packname/dub.json ]; then # package is there, it should have failed
  13. cleanup
  14. exit 1
  15. fi
  16. exit 0