Newer
Older
dub_jkp / test / issue1024-selective-upgrade.sh
@Martin Nowak Martin Nowak on 4 Jul 2017 493 bytes replace all usages of `exit`
  1. #!/usr/bin/env bash
  2.  
  3. . $(dirname "${BASH_SOURCE[0]}")/common.sh
  4. cd ${CURR_DIR}/issue1024-selective-upgrade
  5. echo "{\"fileVersion\": 1,\"versions\": {\"a\": \"1.0.0\", \"b\": \"1.0.0\"}}" > main/dub.selections.json
  6. $DUB upgrade --bare --root=main a
  7.  
  8. if ! grep -c -e "\"a\": \"1.0.1\"" main/dub.selections.json; then
  9. die $LINENO "Specified dependency was not upgraded."
  10. fi
  11.  
  12. if grep -c -e "\"b\": \"1.0.1\"" main/dub.selections.json; then
  13. die $LINENO "Non-specified dependency got upgraded."
  14. fi