aboutsummaryrefslogtreecommitdiffstats
path: root/doc/RELEASE_NOTES-1.2.2.md
blob: 7e09fdae3a4d76359ff3430ef6c68f9516ee2cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# shFlags 1.2.2 Release Notes

https://github.com/kward/shflags

## Preface

This document covers any known issues and workarounds for the stated release of
shFlags.

## Release info

This is a minor bug fix release.

Please see the `CHANGES-1.2.md` file for a complete list of changes.

### Notable changes

Continuous integration testing setup with [Travis CI][travis-ci]. This helps
keep the code in a working state by executing the unit tests on every submit.

[travis-ci]: https://travis-ci.org/kward/shflags

All code run through [ShellCheck](http://www.shellcheck.net/). This is an
excellent shell linter, and brings consistency to the coding patterns used.

The code was restructured to be more GitHub friendly. It should make the code
more appealing to a wider audience.

### Notable bug fixes

Fixed issue #45. Empty help string causes `shflags_test_issue_28.sh` to fail.

## General info

### The unit tests

shFlags is designed to work on as many environments as possible, but not all
environments are created equal. As such, not all of the unit tests will succeed
on every platform. The unit tests are therefore designed to fail, indicating to
the tester that the supported functionality is not present, but an additional
test is present to verify that shFlags properly caught the limitation and
presented the user with an appropriate error message.

shFlags tries to support both the standard and enhanced versions of `getopt`. As
each responds differently, and not everything is supported on the standard
version, some unit tests will be skipped (i.e. ASSERTS will not be thrown) when
the standard version of `getopt` is detected. The reason being that there is no
point testing for functionality that is positively known not to exist. A tally
of skipped tests will be kept for later reference.

### Standard vs Enhanced getopt

Here is a matrix of the supported features of the various `getopt` variants.

Feature                                 | std | enh
--------------------------------------- | --- | ---
short option names                      | Y   | Y
long option names                       | N   | Y
spaces in string options                | N   | Y
intermixing of flag and non-flag values | N   | Y

## Known Issues

The `getopt` version provided by default with all versions of Mac OS X (up to
and including 10.13.0) and Solaris (up to and including Solaris 10 and
OpenSolaris) is the standard version.

## Workarounds

The Zsh shell requires the `shwordsplit` option to be set and the special
`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to see
how the unit tests do this.