Newer
Older
dub_jkp / test / issue1194-warn-wrong-subconfig.sh
@Sönke Ludwig Sönke Ludwig on 25 Oct 2017 993 bytes Add test.
  1. #!/usr/bin/env bash
  2. set -e
  3.  
  4. OUTPUT=`${DUB} build --root ${CURR_DIR}/issue1194-warn-wrong-subconfig 2>&1 || true`
  5.  
  6. # make sure the proper errors occur in the output
  7. echo $OUTPUT | grep -c "sub configuration directive \"bar\" -> \"baz\" references a package that is not specified as a dependency" > /dev/null
  8. echo $OUTPUT | grep -c "sub configuration directive \"staticlib-simple\" -> \"foo\" references a configuration that does not exist" > /dev/null
  9. ! echo $OUTPUT | grep -c "sub configuration directive \"sourcelib-simple\" -> \"library\" references a package that is not specified as a dependency" > /dev/null
  10. ! echo $OUTPUT | grep -c "sub configuration directive \"sourcelib-simple\" -> \"library\" references a configuration that does not exist" > /dev/null
  11.  
  12. # make sure no bogs warnings are issued for packages with no sub configuration directives
  13. OUTPUT=`${DUB} build --root ${CURR_DIR}/1-exec-simple 2>&1`
  14. ! echo $OUTPUT | grep -c "sub configuration directive.*references" > /dev/null