Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

triangle application: help should return ecode of 0 and should be listed in help #3

Open
freznicek opened this issue Mar 26, 2018 · 0 comments

Comments

@freznicek
Copy link
Owner

freznicek commented Mar 26, 2018

Description of problem:

triangle application help is application mode which should:

  • return ecode of 0
  • should be listed in help (--help|-h should be listed in the help itself)

Version-Release number of selected component (if applicable):
triangle v1.0.0 https://github.com/freznicek/qa-crashcourse/releases/tag/v1.0.0
executed on updated Debian Jessie amd64 / Fedora 24 x86_64.

How reproducible:
Always (100%)

Steps to Reproduce:

  1. make rebuild
  2. ./triangle -h; echo $?
  3. ./triangle --help; echo $?
  4. ./triangle -h | grep -F "--help"; echo $?

Actual results:
Triangle application treats help operation as invalid according it's exit code. Moreover --help is not listed in the help text:

$ ./triangle -h; echo $?
triangle <a-side-length> <b-side-length> <c-side-length> usage:                                                                                                                                
  triangle validity tester, where <?-side-length> is length of a triangle side.                                                                                                                

  returns ecode of 0 / 1 / 2 with meaning: valid / invalid / input error                                                                                                                       
2                                                                                                                                                                                              

$ ./triangle --help; echo $?
triangle <a-side-length> <b-side-length> <c-side-length> usage:                                                                                                                                
  triangle validity tester, where <?-side-length> is length of a triangle side.                                                                                                                

  returns ecode of 0 / 1 / 2 with meaning: valid / invalid / input error                                                                                                                       
2                                                                                                                                                                                              

$ ./triangle -h | grep -F "\-\-help"; echo $?
triangle <a-side-length> <b-side-length> <c-side-length> usage:
  triangle validity tester, where <?-side-length> is length of a triangle side.

  returns ecode of 0 / 1 / 2 with meaning: valid / invalid / input error
1

Expected results:
The expected exit codes are 0, 0 and 0, i.e. help is valid application operation and listed in the help text.

Additional info:

Repository owner locked and limited conversation to collaborators Mar 28, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant