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