Newer
Older
dub_jkp / test / help.sh
  1. #!/usr/bin/env bash
  2.  
  3. . $(dirname "${BASH_SOURCE[0]}")/common.sh
  4.  
  5. ### It shows the general help message
  6. if ! { ${DUB} help | grep "Manages the DUB project in the current directory."; } then
  7. die $LINENO 'DUB did not print the default help message, with the `help` command.'
  8. fi
  9.  
  10. if ! { ${DUB} -h | grep "Manages the DUB project in the current directory."; } then
  11. die $LINENO 'DUB did not print the default help message, with the `-h` argument.'
  12. fi
  13.  
  14. if ! { ${DUB} --help | grep "Manages the DUB project in the current directory."; } then
  15. die $LINENO 'DUB did not print the default help message, with the `--help` argument.'
  16. fi
  17.  
  18. ### It shows the build command help
  19. if ! { ${DUB} build -h | grep "Builds a package"; } then
  20. die $LINENO 'DUB did not print the build help message, with the `-h` argument.'
  21. fi
  22.  
  23. if ! { ${DUB} build --help | grep "Builds a package"; } then
  24. die $LINENO 'DUB did not print the build help message, with the `--help` argument.'
  25. fi