|
| 1 | +# shFlags 1.3.0 Release Notes |
| 2 | + |
| 3 | +https://github.com/kward/shflags |
| 4 | + |
| 5 | +## Preface |
| 6 | + |
| 7 | +This document covers any known issues and workarounds for the stated release of |
| 8 | +shFlags. |
| 9 | + |
| 10 | +## Release info |
| 11 | + |
| 12 | +This is the first release in the new testing series. The primary change from |
| 13 | +1.2.3 was reworking things so that 'set -e' is supported. |
| 14 | + |
| 15 | +Please see the `CHANGES-1.3.md` file for a complete list of changes. |
| 16 | + |
| 17 | +### Notable changes |
| 18 | + |
| 19 | +The obsolete `FLAGS_ARGC` variable was removed. |
| 20 | + |
| 21 | +### Notable bug fixes |
| 22 | + |
| 23 | +Some rewrites to ensure shell 'set -e' (as well as 'set -u' and |
| 24 | +'set -o pipefail') are supported as expected. |
| 25 | + |
| 26 | +## General info |
| 27 | + |
| 28 | +### The unit tests |
| 29 | + |
| 30 | +shFlags is designed to work on as many environments as possible, but not all |
| 31 | +environments are created equal. As such, not all of the unit tests will succeed |
| 32 | +on every platform. The unit tests are therefore designed to fail, indicating to |
| 33 | +the tester that the supported functionality is not present, but an additional |
| 34 | +test is present to verify that shFlags properly caught the limitation and |
| 35 | +presented the user with an appropriate error message. |
| 36 | + |
| 37 | +shFlags tries to support both the standard and enhanced versions of `getopt`. As |
| 38 | +each responds differently, and not everything is supported on the standard |
| 39 | +version, some unit tests will be skipped (i.e. ASSERTS will not be thrown) when |
| 40 | +the standard version of `getopt` is detected. The reason being that there is no |
| 41 | +point testing for functionality that is positively known not to exist. A tally |
| 42 | +of skipped tests will be kept for later reference. |
| 43 | + |
| 44 | +### Standard vs Enhanced getopt |
| 45 | + |
| 46 | +Here is a matrix of the supported features of the various `getopt` variants. |
| 47 | + |
| 48 | +Feature | std | enh |
| 49 | +--------------------------------------- | --- | --- |
| 50 | +short option names | Y | Y |
| 51 | +long option names | N | Y |
| 52 | +spaces in string options | N | Y |
| 53 | +intermixing of flag and non-flag values | N | Y |
| 54 | + |
| 55 | +## Known Issues |
| 56 | + |
| 57 | +The `getopt` version provided by default with all versions of Mac OS X (up to |
| 58 | +and including 10.13.0) and Solaris (up to and including Solaris 10 and |
| 59 | +OpenSolaris) is the standard version. |
| 60 | + |
| 61 | +## Workarounds |
| 62 | + |
| 63 | +The Zsh shell requires the `shwordsplit` option to be set and the special |
| 64 | +`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to see |
| 65 | +how the unit tests do this. |
0 commit comments