Skip to content

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

@freznicek

Description

@freznicek

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions