| 1 | No args, no errors
|
|---|
| 2 | Usage:
|
|---|
| 3 | ./usage Test usage
|
|---|
| 4 | -h, --help print this help message
|
|---|
| 5 | Child status:
|
|---|
| 6 | IFEXITED : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 0, IFCONTINUED: 0
|
|---|
| 7 |
|
|---|
| 8 | No args, with errors
|
|---|
| 9 | Usage:
|
|---|
| 10 | ./usage Test usage
|
|---|
| 11 | -h, --help print this help message
|
|---|
| 12 | Child status:
|
|---|
| 13 | IFEXITED : 1, EXITSTATUS : 1, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 1, IFCONTINUED: 0
|
|---|
| 14 |
|
|---|
| 15 | Args with short names only:
|
|---|
| 16 | Usage:
|
|---|
| 17 | ./usage Test usage
|
|---|
| 18 | -a First arg
|
|---|
| 19 | -b Second arg
|
|---|
| 20 | -c Third arg
|
|---|
| 21 | -h, --help print this help message
|
|---|
| 22 | Child status:
|
|---|
| 23 | IFEXITED : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 0, IFCONTINUED: 0
|
|---|
| 24 |
|
|---|
| 25 | Args with long names only:
|
|---|
| 26 | Usage:
|
|---|
| 27 | ./usage Test usage
|
|---|
| 28 | --AA First arg
|
|---|
| 29 | --BB Second arg
|
|---|
| 30 | --CC Third arg
|
|---|
| 31 | -h, --help print this help message
|
|---|
| 32 | Child status:
|
|---|
| 33 | IFEXITED : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 0, IFCONTINUED: 0
|
|---|
| 34 |
|
|---|
| 35 | Mix of short and long args:
|
|---|
| 36 | Usage:
|
|---|
| 37 | ./usage Test usage
|
|---|
| 38 | -a First arg
|
|---|
| 39 | -b, --BBBB Second arg
|
|---|
| 40 | --CC Third arg
|
|---|
| 41 | -h, --help print this help message
|
|---|
| 42 | Child status:
|
|---|
| 43 | IFEXITED : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 0, IFCONTINUED: 0
|
|---|
| 44 |
|
|---|
| 45 | Mix of short and long and some missing description:
|
|---|
| 46 | Usage:
|
|---|
| 47 | ./usage Test usage
|
|---|
| 48 | -a First arg
|
|---|
| 49 | -b, --BBBB
|
|---|
| 50 | --CC Third arg
|
|---|
| 51 | -h, --help print this help message
|
|---|
| 52 | Child status:
|
|---|
| 53 | IFEXITED : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 0, IFCONTINUED: 0
|
|---|
| 54 |
|
|---|
| 55 | Mix of short and long and some long description:
|
|---|
| 56 | Usage:
|
|---|
| 57 | ./usage Test usage
|
|---|
| 58 | -a First arg
|
|---|
| 59 | The description has multiple lines,
|
|---|
| 60 | ...for some reason
|
|---|
| 61 | -b, --BBBB 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
|
|---|
| 62 | --CC Third arg
|
|---|
| 63 | -h, --help print this help message
|
|---|
| 64 | Child status:
|
|---|
| 65 | IFEXITED : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG : 0, COREDUMP : 0, IFSTOPPED : 0, STOPSIG : 0, IFCONTINUED: 0
|
|---|
| 66 |
|
|---|