aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Ward <kate.ward@forestent.com>2017-10-21 21:25:31 +0200
committerKate Ward <kate.ward@forestent.com>2017-10-21 21:25:31 +0200
commit350c4c2bc5c556387d5ca1f8fbd64337b3f3b816 (patch)
tree67370ee40d41d948bba2526edffbace5bb41b649
parent5a214170cbe8e41bb0f2ee73f23064dfce5f106b (diff)
parent16e8d0d3a58dfe8ccc0423b2cfbdf8119e7a86d7 (diff)
downloadshflags-350c4c2bc5c556387d5ca1f8fbd64337b3f3b816.tar.gz
Merge branch 'master' of github.com:kward/shflags
-rw-r--r--.travis.yml26
-rw-r--r--CODE_OF_CONDUCT.md46
-rw-r--r--CONTRIBUTING.md (renamed from doc/coding_standards.md)0
-rw-r--r--README.md2
-rw-r--r--bin/gen_test_results.flags5
-rwxr-xr-xbin/gen_test_results.sh86
-rw-r--r--doc/CHANGES-1.2.md63
-rw-r--r--doc/LICENSE.shunit2703
-rw-r--r--doc/RELEASE_NOTES-1.2.0.md2
-rw-r--r--doc/RELEASE_NOTES-1.2.1.md66
-rw-r--r--doc/RELEASE_NOTES-1.2.2.md74
-rwxr-xr-xgen_test_report.sh88
-rw-r--r--lib/shflags227
-rw-r--r--lib/shunit2542
-rwxr-xr-xlib/versions90
-rw-r--r--shflags (renamed from src/shflags)287
-rwxr-xr-xshflags_defines_test.sh (renamed from src/shflags_test_defines.sh)102
-rwxr-xr-xshflags_issue_28_test.sh (renamed from src/shflags_test_issue_28.sh)61
-rwxr-xr-xshflags_parsing_test.sh (renamed from src/shflags_test_parsing.sh)171
-rwxr-xr-xshflags_private_test.sh (renamed from src/shflags_test_private.sh)140
-rwxr-xr-xshflags_public_test.sh (renamed from src/shflags_test_public.sh)84
-rw-r--r--shflags_test_helpers127
-rwxr-xr-xsrc/shflags_test.sh109
-rw-r--r--src/shflags_test_helpers116
-rw-r--r--test_results/1.0.1/Linux-Ubuntu_Dapper-6.06.txt430
-rw-r--r--test_results/1.0.1/Linux-Ubuntu_Hardy-8.04.txt512
-rw-r--r--test_results/1.0.1/Mac_OS_X-10.5.4.txt368
-rw-r--r--test_results/1.0.1/Solaris-9-U6-x86.txt366
-rw-r--r--test_results/1.0.1/Solaris-nv-77-x86.txt366
-rw-r--r--test_results/1.0.2/Linux-Red_Hat_Linux_release_9_(Shrike).txt214
-rw-r--r--test_results/1.0.2/Linux-Ubuntu-6.06.txt328
-rw-r--r--test_results/1.0.2/Linux-Ubuntu-8.04.txt379
-rw-r--r--test_results/1.0.2/Mac_OS_X-10.5.5.txt291
-rw-r--r--test_results/1.0.2/Solaris-11.txt283
-rw-r--r--test_results/1.0.3/Linux-Ubuntu-6.06.txt348
-rw-r--r--test_results/1.0.3/Linux-Ubuntu-8.04.txt409
-rw-r--r--test_results/1.0.3/Mac_OS_X-10.5.6.txt287
-rw-r--r--test_results/1.0.3/Solaris-5.11-NexentaOS_20081207.txt235
-rw-r--r--test_results/1.0.3/Solaris-5.11-snv_77.txt287
-rw-r--r--test_results/1.2.0/FreeBSD-9.1.txt111
-rw-r--r--test_results/1.2.0/Linux-Ubuntu-10.04.4-LTS.txt451
-rw-r--r--test_results/1.2.0/Linux-Ubuntu-12.04.1-LTS.txt451
-rw-r--r--test_results/1.2.0/Linux-Ubuntu-14.04.3-LTS.txt451
-rw-r--r--test_results/1.2.0/Linux-Ubuntu-8.04.4-LTS.txt451
-rw-r--r--test_results/1.2.0/Mac_OS_X-10.10.3.txt315
-rw-r--r--test_results/1.2.0/Mac_OS_X-10.8.2.txt315
-rw-r--r--test_results/1.2.0/OpenSolaris-2009.06(snv_111b).txt247
-rw-r--r--test_results/1.2.0/Solaris-10u10.txt316
-rw-r--r--test_results/1.2.0/Solaris-8u7.txt316
-rw-r--r--test_results/1.2.0/Solaris-9u8.txt316
-rwxr-xr-xtest_runner147
51 files changed, 1760 insertions, 10447 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..762e19c
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,26 @@
+language: bash
+
+env:
+ - SHUNIT_COLOR='always'
+
+script:
+ # Execute the unit tests.
+ - ./test_runner
+
+os:
+ - linux
+ - osx
+
+addons:
+ apt:
+ packages:
+ - ksh
+ - zsh
+
+matrix:
+ include:
+ - os: linux
+ script:
+ # Run the source through ShellCheck (http://www.shellcheck.net).
+ - shellcheck gen_test_report.sh *_test.sh
+ - shellcheck -s sh shflags shflags_test_helpers
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..dc906ab
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at kate.ward@forestent.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/doc/coding_standards.md b/CONTRIBUTING.md
index b071876..b071876 100644
--- a/doc/coding_standards.md
+++ b/CONTRIBUTING.md
diff --git a/README.md b/README.md
index 145f54d..f33cf90 100644
--- a/README.md
+++ b/README.md
@@ -8,3 +8,5 @@ possible to work across a wide array of Unix variants. It is also tested with
If you'd like to use shFlags, feel free to read the documentation.
https://github.com/kward/shflags/wiki/Documentation12x
+
+[![Travis CI](https://travis-ci.org/kward/shflags.png?branch=master)](https://travis-ci.org/kward/shflags)
diff --git a/bin/gen_test_results.flags b/bin/gen_test_results.flags
deleted file mode 100644
index 4efe4c3..0000000
--- a/bin/gen_test_results.flags
+++ /dev/null
@@ -1,5 +0,0 @@
-# vim:et:ft=sh:sts=2:sw=2
-#
-# Flag definition overrides for the gen_test_results.sh script.
-
-DEFINE_string suite 'shflags_test.sh' 'unit test suite' s
diff --git a/bin/gen_test_results.sh b/bin/gen_test_results.sh
deleted file mode 100755
index c15ff9b..0000000
--- a/bin/gen_test_results.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /bin/sh
-# vim:et:ft=sh:sts=2:sw=2
-#
-# This script runs the provided unit tests and sends the output to the
-# appropriate file.
-
-# Treat unset variables as an error.
-set -u
-
-die() {
- [ $# -gt 0 ] && echo "error: $@" >&2
- exit 1
-}
-
-BASE_DIR="`dirname $0`/.."
-LIB_DIR="${BASE_DIR}/lib"
-
-# Load libraries.
-. ${LIB_DIR}/shflags || die 'unable to load shflags library'
-. ${LIB_DIR}/shlib || die 'unable to load shlib library'
-. ${LIB_DIR}/versions || die 'unable to load versions library'
-
-# Redefining BASE_DIR now that we have the shlib functions.
-BASE_DIR=`shlib_relToAbsPath "${BASE_DIR}"`
-BIN_DIR="${BASE_DIR}/bin"
-SRC_DIR="${BASE_DIR}/src"
-
-__GEN_TEST_RESULTS_BACKUP_EXT='~'
-
-os_name=`versions_osName |sed 's/ /_/g'`
-os_version=`versions_osVersion`
-
-# Load external flags.
-. ${BIN_DIR}/gen_test_results.flags
-
-# Define flags.
-DEFINE_boolean force false 'force overwrite' f
-DEFINE_boolean backup false 'backup old output file' b
-DEFINE_string output_dir "`pwd`" 'output dir' d
-DEFINE_string output_file "${os_name}-${os_version}.txt" 'output file' o
-DEFINE_boolean dry_run false "suppress logging to a file" n
-
-main() {
- # Determine output filename.
- output="${FLAGS_output_dir:+${FLAGS_output_dir}/}${FLAGS_output_file}"
- output=`shlib_relToAbsPath "${output}"`
-
- # Checks.
- [ -n "${FLAGS_suite:-}" ] || die 'suite flag missing'
-
- if [ ${FLAGS_dry_run} -eq ${FLAGS_FALSE} ]; then
- if [ -f "${output}" -a ${FLAGS_backup} -eq ${FLAGS_TRUE} ]; then
- old="${output}" new="${output}${__GEN_TEST_RESULTS_BACKUP_EXT}"
- echo "backing up '${old}' to '${new}'"
- mv "${old}" "${new}"
- fi
- if [ -f "${output}" -a ${FLAGS_force} -eq ${FLAGS_TRUE} ]; then
- rm -f "${output}"
- fi
- if [ -f "${output}" ]; then
- echo "not overwriting '${output}'" >&2
- exit ${FLAGS_ERROR}
- fi
- touch "${output}" 2>/dev/null || die "unable to write to '${output}'"
- fi
-
- # Run tests.
- (
- cd "${SRC_DIR}";
- if [ ${FLAGS_dry_run} -eq ${FLAGS_FALSE} ]; then
- ./${FLAGS_suite} |tee "${output}"
- else
- ./${FLAGS_suite}
- fi
- )
-
- if [ ! ${FLAGS_dry_run} ]; then
- echo >&2
- echo "output written to '${output}'" >&2
- fi
-}
-
-FLAGS "$@" || exit $?
-[ ${FLAGS_help} -eq ${FALSE} ] || exit
-eval set -- "${FLAGS_ARGV}"
-main "$@"
diff --git a/doc/CHANGES-1.2.md b/doc/CHANGES-1.2.md
index d71c08e..c89cc70 100644
--- a/doc/CHANGES-1.2.md
+++ b/doc/CHANGES-1.2.md
@@ -1,16 +1,41 @@
-Changes in shFlags
-==================
+# Changes in shFlags
-Changes with 1.2.1
-------------------
+## Changes with 1.2.3
+
+Fixed bug in `_flags_columns()` where `stty size` sometimes gave unexpected output, causing the function to not work.
+
+Replaced `test_runner` with upstream from https://github.com/kward/shlib.
+
+
+## Changes with 1.2.2
+
+Ran all scripts through [ShellCheck](http://www.shellcheck.net/).
+
+Replaced `shflags_test.sh` with `test_runner` from
+https://github.com/kward/shlib.
+
+Fixed issue #45. Empty help string causes `shflags_test_issue_28.sh` to fail.
+
+Continuous integration testing setup with
+[Travis CI](https://travis-ci.org/kward/shflags).
+
+Restructured code to be more GitHub like.
+
+
+## Changes with 1.2.1
+
+Fixed issue #43. Added support for BusyBox `ash` shell.
+
+Fixed issues #26, #27. Re-factored `_flags_itemInList()` to use built-ins.
+
+Fixed issue #31. Documented newline support in FLAGS_HELP.
Fixed issue #28. DEFINE_boolean misbehaves when help-string is empty.
Fixed issue #25. Fix some typos.
-Changes with 1.2.0
-------------------
+## Changes with 1.2.0
Changed from the LGPL v2.1 license to the Apache v2.0 license so that others
can include the library or make changes without needing to release the modified
@@ -18,7 +43,7 @@ source code as well.
Moved documentation to Markdown.
-Migrated the code to GitHub as code.google.com is turning down.
+Migrated the code to GitHub as http://code.google.com/ is turning down.
Fixed issue #10. Usage of `expr` under FreeBSD 7.2 (FreeNAS 0.7.1) and FreeBSD
8.0 that was causing many unit tests to fail.
@@ -40,10 +65,11 @@ defining the `FLAGS_GETOPT_CMD` variable.
Updated `gen_test_results.sh` and versions from shUnit2 source.
-Fixed issues# 13, 14. Added support for dashes ('-') in long flag names. The
-defined flag will still be declared with underscores ('_') due to shell
+Fixed issues# 13, 14. Added support for dashes '-' in long flag names. The
+defined flag will still be declared with underscores '\_' due to shell
limitations, so only one of a dashed flag name or an underscored flag name are
allowed, not both.
+(Backslash on \_ to prevent Markdown formatting.)
Issue #20. Updated LGPL v2.1 license from
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt.
@@ -64,8 +90,7 @@ built-ins where possible to increase performance and reduce the usage of the
Added separate built-in and `expr` functions for doing math.
-Changes with 1.0.3
-------------------
+## Changes with 1.0.3
MAJOR CHANGE! `FLAGS_ARGC` is now obsolete, and is replaced by
`FLAGS_ARGV`. See below for more info.
@@ -76,7 +101,8 @@ available because the value returned by `FLAGS_ARGC` was wrong. The
`FLAGS_ARGC` value is now obsolete, but will be maintained for backwards
compatibility. The new method of getting the non-flag arguments is by executing
`eval set -- "${FLAGS_ARGV}"` after the `FLAGS` call. The arguments will
-then be available using the standard shell $#, $@, $*, $1, etc. variables.
+then be available using the standard shell $#, $@, $\*, $1, etc. variables.
+(Backslash on \* to prevent Markdown formatting.)
Due to above fix for issue# 7, there is now proper support for mixing flags
with non-flag arguments on the command-line. Previously, all non-flag arguments
@@ -106,11 +132,10 @@ Added the OS version to OS release for Solaris.
Fixed `flags_reset()` so it unsets the default value environment vars.
-Changes with 1.0.2
-------------------
+## Changes with 1.0.2
-FLAGS_PARENT no longer transforms into a constant so that it can be defined at
-run time in scripts.
+${FLAGS_PARENT} no longer transforms into a constant so that it can be defined
+at run time in scripts.
Added warning about short flags being unsupported when there are problems
parsing the options with `getopt`.
@@ -138,8 +163,7 @@ Issue# 2: Passing the `--nohelp` option no longer gives help output.
Issue# 3: Added support for screen width detection.
-Changes with 1.0.1
-------------------
+## Changes with 1.0.1
Fixed bug where the help output added '[no]' to all flag names
@@ -157,7 +181,6 @@ library cannot be used until functions are called from the main code. This
required the 'help' flag definition to be moved inside the FLAGS command.
-Changes with 1.0.0
-------------------
+## Changes with 1.0.0
This is the first official release, so everything is new.
diff --git a/doc/LICENSE.shunit2 b/doc/LICENSE.shunit2
index 4362b49..8dada3e 100644
--- a/doc/LICENSE.shunit2
+++ b/doc/LICENSE.shunit2
@@ -1,502 +1,201 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/doc/RELEASE_NOTES-1.2.0.md b/doc/RELEASE_NOTES-1.2.0.md
index bf76941..09cb69d 100644
--- a/doc/RELEASE_NOTES-1.2.0.md
+++ b/doc/RELEASE_NOTES-1.2.0.md
@@ -12,7 +12,7 @@ Release info
This is a minor bug fix release.
-Please see the `CHANGES-1.0.txt` file for a complete list of changes.
+Please see the `CHANGES-1.2.md` file for a complete list of changes.
Major changes
-------------
diff --git a/doc/RELEASE_NOTES-1.2.1.md b/doc/RELEASE_NOTES-1.2.1.md
new file mode 100644
index 0000000..789768e
--- /dev/null
+++ b/doc/RELEASE_NOTES-1.2.1.md
@@ -0,0 +1,66 @@
+# shFlags 1.2.1 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
+
+Support for the BusyBox `ash` shell was added.
+
+### Notable bug fixes
+
+Fixed issue #28. DEFINE_boolean misbehaves when help-string is empty.
+
+
+## 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.10.2) 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.
diff --git a/doc/RELEASE_NOTES-1.2.2.md b/doc/RELEASE_NOTES-1.2.2.md
new file mode 100644
index 0000000..c919314
--- /dev/null
+++ b/doc/RELEASE_NOTES-1.2.2.md
@@ -0,0 +1,74 @@
+# 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](https://travis-ci.org/kward/shflags). This helps keep the code in
+a working state by executing the unit tests on every submit.
+
+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.
diff --git a/gen_test_report.sh b/gen_test_report.sh
new file mode 100755
index 0000000..28da021
--- /dev/null
+++ b/gen_test_report.sh
@@ -0,0 +1,88 @@
+#! /bin/sh
+# vim:et:ft=sh:sts=2:sw=2
+#
+# This script runs the provided unit tests and sends the output to the
+# appropriate file.
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shunit2
+#
+# Source following.
+# shellcheck disable=SC1090,SC1091
+# FLAGS variables are dynamically created.
+# shellcheck disable=SC2154
+# Disagree with [ p ] && [ q ] vs [ p -a -q ] recommendation.
+# shellcheck disable=SC2166
+
+# Treat unset variables as an error.
+set -u
+
+die() {
+ [ $# -gt 0 ] && echo "error: $*" >&2
+ exit 1
+}
+
+BASE_DIR=$(dirname "$0")
+LIB_DIR="${BASE_DIR}/lib"
+
+### Load libraries.
+. "${LIB_DIR}/shflags" || die 'unable to load shflags library'
+. "${LIB_DIR}/shlib" || die 'unable to load shlib library'
+. "${LIB_DIR}/versions" || die 'unable to load versions library'
+
+# Redefining BASE_DIR now that we have the shlib functions. We need BASE_DIR so
+# that we can properly load things, even in the event that this script is called
+# from a different directory.
+BASE_DIR=$(shlib_relToAbsPath "${BASE_DIR}")
+
+# Define flags.
+os_name=$(versions_osName |sed 's/ /_/g')
+os_version=$(versions_osVersion)
+
+DEFINE_boolean force false 'force overwrite' f
+DEFINE_string output_dir "${TMPDIR}" 'output dir' d
+DEFINE_string output_file "${os_name}-${os_version}.txt" 'output file' o
+DEFINE_string runner 'test_runner' 'unit test runner' r
+DEFINE_boolean dry_run false "suppress logging to a file" n
+
+main() {
+ # Determine output filename.
+ # shellcheck disable=SC2154
+ output="${FLAGS_output_dir:+${FLAGS_output_dir}/}${FLAGS_output_file}"
+ output=$(shlib_relToAbsPath "${output}")
+
+ # Checks.
+ if [ "${FLAGS_dry_run}" -eq "${FLAGS_FALSE}" -a -f "${output}" ]; then
+ if [ "${FLAGS_force}" -eq "${FLAGS_TRUE}" ]; then
+ rm -f "${output}"
+ else
+ echo "not overwriting '${output}'" >&2
+ exit "${FLAGS_ERROR}"
+ fi
+ fi
+ if [ "${FLAGS_dry_run}" -eq "${FLAGS_FALSE}" ]; then
+ touch "${output}" 2>/dev/null || die "unable to write to '${output}'"
+ fi
+
+ # Run tests.
+ (
+ if [ "${FLAGS_dry_run}" -eq "${FLAGS_FALSE}" ]; then
+ "./${FLAGS_runner}" |tee "${output}"
+ else
+ "./${FLAGS_runner}"
+ fi
+ )
+
+ if [ "${FLAGS_dry_run}" -eq "${FLAGS_FALSE}" ]; then
+ echo >&2
+ echo "Output written to '${output}'." >&2
+ fi
+}
+
+FLAGS "$@" || exit $?
+[ "${FLAGS_help}" -eq "${FLAGS_FALSE}" ] || exit
+eval set -- "${FLAGS_ARGV}"
+main "${@:-}"
diff --git a/lib/shflags b/lib/shflags
index 9e69e64..470bd1f 100644
--- a/lib/shflags
+++ b/lib/shflags
@@ -1,33 +1,33 @@
-# $Id: shflags 189 2013-01-15 00:13:10Z kate.ward@forestent.com $
# vim:et:ft=sh:sts=2:sw=2
#
-# Copyright 2008 Kate Ward. All Rights Reserved.
-# Released under the LGPL (GNU Lesser General Public License)
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache License 2.0 license.
+# http://www.apache.org/licenses/LICENSE-2.0
#
# shFlags -- Advanced command-line flag library for Unix shell scripts.
-# http://code.google.com/p/shflags/
+# https://github.com/kward/shflags
#
# Author: kate.ward@forestent.com (Kate Ward)
#
-# This module implements something like the google-gflags library available
-# from http://code.google.com/p/google-gflags/.
+# This module implements something like the gflags library available
+# from https://github.com/gflags/gflags.
#
# FLAG TYPES: This is a list of the DEFINE_*'s that you can do. All flags take
# a name, default value, help-string, and optional 'short' name (one-letter
-# name). Some flags have other arguments, which are described with the flag.
+# name). Some flags have other arguments, which are described with the flag.
#
-# DEFINE_string: takes any input, and intreprets it as a string.
+# DEFINE_string: takes any input, and interprets it as a string.
#
# DEFINE_boolean: does not take any arguments. Say --myflag to set
# FLAGS_myflag to true, or --nomyflag to set FLAGS_myflag to false. For short
# flags, passing the flag on the command-line negates the default value, i.e.
# if the default is true, passing the flag sets the value to false.
#
-# DEFINE_float: takes an input and intreprets it as a floating point number. As
+# DEFINE_float: takes an input and interprets it as a floating point number. As
# shell does not support floats per-se, the input is merely validated as
# being a valid floating point value.
#
-# DEFINE_integer: takes an input and intreprets it as an integer.
+# DEFINE_integer: takes an input and interprets it as an integer.
#
# SPECIAL FLAGS: There are a few flags that have special meaning:
# --help (or -?) prints a list of all the flags in a human-readable fashion
@@ -82,27 +82,42 @@
# Notes:
# - lists of strings are space separated, and a null value is the '~' char.
-# return if FLAGS already loaded
+# Return if FLAGS already loaded.
[ -n "${FLAGS_VERSION:-}" ] && return 0
-FLAGS_VERSION='1.0.4pre'
+FLAGS_VERSION='1.2.1'
-# return values that scripts can use
+# Return values that scripts can use.
FLAGS_TRUE=0
FLAGS_FALSE=1
FLAGS_ERROR=2
-# determine some reasonable command defaults
+# Logging levels.
+FLAGS_LEVEL_DEBUG=0
+FLAGS_LEVEL_INFO=1
+FLAGS_LEVEL_WARN=2
+FLAGS_LEVEL_ERROR=3
+FLAGS_LEVEL_FATAL=4
+__FLAGS_LEVEL_DEFAULT=${FLAGS_LEVEL_WARN}
+
+# Determine some reasonable command defaults.
+__FLAGS_EXPR_CMD='expr --'
__FLAGS_UNAME_S=`uname -s`
-case "${__FLAGS_UNAME_S}" in
- BSD) __FLAGS_EXPR_CMD='gexpr' ;;
- *) __FLAGS_EXPR_CMD='expr' ;;
-esac
+if [ "${__FLAGS_UNAME_S}" = 'BSD' ]; then
+ __FLAGS_EXPR_CMD='gexpr --'
+else
+ _flags_output_=`${__FLAGS_EXPR_CMD} 2>&1`
+ if [ $? -eq ${FLAGS_TRUE} -a "${_flags_output_}" = '--' ]; then
+ # We are likely running inside BusyBox.
+ __FLAGS_EXPR_CMD='expr'
+ fi
+ unset _flags_output_
+fi
-# commands a user can override if needed
+# Commands a user can override if needed.
FLAGS_EXPR_CMD=${FLAGS_EXPR_CMD:-${__FLAGS_EXPR_CMD}}
FLAGS_GETOPT_CMD=${FLAGS_GETOPT_CMD:-getopt}
-# specific shell checks
+# Specific shell checks.
if [ -n "${ZSH_VERSION:-}" ]; then
setopt |grep "^shwordsplit$" >/dev/null
if [ $? -ne ${FLAGS_TRUE} ]; then
@@ -114,7 +129,7 @@ if [ -n "${ZSH_VERSION:-}" ]; then
fi
fi
-# can we use built-ins?
+# Can we use built-ins?
( echo "${FLAGS_TRUE#0}"; ) >/dev/null 2>&1
if [ $? -eq ${FLAGS_TRUE} ]; then
__FLAGS_USE_BUILTIN=${FLAGS_TRUE}
@@ -122,15 +137,16 @@ else
__FLAGS_USE_BUILTIN=${FLAGS_FALSE}
fi
+
#
-# constants
+# Constants.
#
-# reserved flag names
+# Reserved flag names.
__FLAGS_RESERVED_LIST=' ARGC ARGV ERROR FALSE GETOPT_CMD HELP PARENT TRUE '
__FLAGS_RESERVED_LIST="${__FLAGS_RESERVED_LIST} VERSION "
-# getopt version
+# getopt version.
__FLAGS_GETOPT_VERS_STD=0
__FLAGS_GETOPT_VERS_ENH=1
__FLAGS_GETOPT_VERS_BSD=2
@@ -138,6 +154,7 @@ __FLAGS_GETOPT_VERS_BSD=2
${FLAGS_GETOPT_CMD} >/dev/null 2>&1
case $? in
0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;; # bsd getopt
+ 1) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_ENH} ;; # BusyBox getopt.
2)
# TODO(kward): look into '-T' option to test the internal getopt() version
if [ "`${FLAGS_GETOPT_CMD} --version`" = '-- ' ]; then
@@ -155,65 +172,102 @@ __FLAGS_OPTSTR_LONG=1
__FLAGS_NULL='~'
-# flag info strings
+# Flag info strings.
__FLAGS_INFO_DEFAULT='default'
__FLAGS_INFO_HELP='help'
__FLAGS_INFO_SHORT='short'
__FLAGS_INFO_TYPE='type'
-# flag lengths
+# Flag lengths.
__FLAGS_LEN_SHORT=0
__FLAGS_LEN_LONG=1
-# flag types
+# Flag types.
__FLAGS_TYPE_NONE=0
__FLAGS_TYPE_BOOLEAN=1
__FLAGS_TYPE_FLOAT=2
__FLAGS_TYPE_INTEGER=3
__FLAGS_TYPE_STRING=4
-# set the constants readonly
+# Set the constants readonly.
__flags_constants=`set |awk -F= '/^FLAGS_/ || /^__FLAGS_/ {print $1}'`
for __flags_const in ${__flags_constants}; do
- # skip certain flags
+ # Skip certain flags.
case ${__flags_const} in
FLAGS_HELP) continue ;;
FLAGS_PARENT) continue ;;
esac
- # set flag readonly
+ # Set flag readonly.
if [ -z "${ZSH_VERSION:-}" ]; then
readonly ${__flags_const}
- else # handle zsh
- case ${ZSH_VERSION} in
- [123].*) readonly ${__flags_const} ;;
- *) readonly -g ${__flags_const} ;; # declare readonly constants globally
- esac
+ continue
fi
+ case ${ZSH_VERSION} in
+ [123].*) readonly ${__flags_const} ;;
+ *) readonly -g ${__flags_const} ;; # Declare readonly constants globally.
+ esac
done
unset __flags_const __flags_constants
#
-# internal variables
+# Internal variables.
#
-# space separated lists
-__flags_boolNames=' ' # boolean flag names
-__flags_longNames=' ' # long flag names
-__flags_shortNames=' ' # short flag names
-__flags_definedNames=' ' # defined flag names (used for validation)
+# Space separated lists.
+__flags_boolNames=' ' # Boolean flag names.
+__flags_longNames=' ' # Long flag names.
+__flags_shortNames=' ' # Short flag names.
+__flags_definedNames=' ' # Defined flag names (used for validation).
-__flags_columns='' # screen width in columns
-__flags_opts='' # temporary storage for parsed getopt flags
+__flags_columns='' # Screen width in columns.
+__flags_level=0 # Default logging level.
+__flags_opts='' # Temporary storage for parsed getopt flags.
#------------------------------------------------------------------------------
-# private functions
+# Private functions.
#
-# logging functions
-_flags_debug() { echo "flags:DEBUG $@" >&2; }
-_flags_warn() { echo "flags:WARN $@" >&2; }
-_flags_error() { echo "flags:ERROR $@" >&2; }
-_flags_fatal() { echo "flags:FATAL $@" >&2; exit ${FLAGS_ERROR}; }
+# Logging functions.
+_flags_debug() {
+ [ ${__flags_level} -le ${FLAGS_LEVEL_DEBUG} ] || return
+ echo "flags:DEBUG $@" >&2
+}
+_flags_info() {
+ [ ${__flags_level} -le ${FLAGS_LEVEL_INFO} ] || return
+ echo "flags:INFO $@" >&2
+}
+_flags_warn() {
+ [ ${__flags_level} -le ${FLAGS_LEVEL_WARN} ] || return
+ echo "flags:WARN $@" >&2
+}
+_flags_error() {
+ [ ${__flags_level} -le ${FLAGS_LEVEL_ERROR} ] || return
+ echo "flags:ERROR $@" >&2
+}
+_flags_fatal() {
+ [ ${__flags_level} -le ${FLAGS_LEVEL_FATAL} ] || return
+ echo "flags:FATAL $@" >&2
+ exit ${FLAGS_ERROR}
+}
+
+# Get the logging level.
+flags_loggingLevel() { echo ${__flags_level}; }
+
+# Set the logging level.
+#
+# Args:
+# _flags_level_: integer: new logging level
+# Returns:
+# nothing
+flags_setLoggingLevel() {
+ [ $# -ne 1 ] && _flags_fatal "flags_setLevel(): logging level missing"
+ _flags_level_=$1
+ [ ${_flags_level_} -ge ${FLAGS_LEVEL_DEBUG} \
+ -a ${_flags_level_} -le ${FLAGS_LEVEL_FATAL} ] \
+ || _flags_fatal "Invalid logging level '${_flags_level_}' specified."
+ __flags_level=$1
+ unset _flags_level_
+}
# Define a flag.
#
@@ -226,11 +280,11 @@ _flags_fatal() { echo "flags:FATAL $@" >&2; exit ${FLAGS_ERROR}; }
# __flags_flagname_type - the type of flag (one of __FLAGS_TYPE_*)
#
# Args:
-# _flags__type: integer: internal type of flag (__FLAGS_TYPE_*)
-# _flags__name: string: long flag name
-# _flags__default: default flag value
-# _flags__help: string: help string
-# _flags__short: string: (optional) short flag name
+# _flags_type_: integer: internal type of flag (__FLAGS_TYPE_*)
+# _flags_name_: string: long flag name
+# _flags_default_: default flag value
+# _flags_help_: string: help string
+# _flags_short_: string: (optional) short flag name
# Returns:
# integer: success of operation, or error
_flags_define()
@@ -248,6 +302,10 @@ _flags_define()
_flags_help_=$4
_flags_short_=${5:-${__FLAGS_NULL}}
+ _flags_debug "type:${_flags_type_} name:${_flags_name_}" \
+ "default:'${_flags_default_}' help:'${_flags_help_}'" \
+ "short:${_flags_short_}"
+
_flags_return_=${FLAGS_TRUE}
_flags_usName_=`_flags_underscoreName ${_flags_name_}`
@@ -332,7 +390,7 @@ _flags_define()
fi
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
- # store flag information
+ # Store flag information.
eval "FLAGS_${_flags_usName_}='${_flags_default_}'"
eval "__flags_${_flags_usName_}_${__FLAGS_INFO_TYPE}=${_flags_type_}"
eval "__flags_${_flags_usName_}_${__FLAGS_INFO_DEFAULT}=\
@@ -437,7 +495,7 @@ _flags_getFlagInfo()
_flags_infoVar_="__flags_${_flags_gFI_usName_}_${_flags_gFI_info_}"
_flags_strToEval_="_flags_infoValue_=\"\${${_flags_infoVar_}:-}\""
eval "${_flags_strToEval_}"
- if [ -n "${_flags_infoValue_}" ]; then
+ if [ -n "${_flags_infoValue_+x}" ]; then
flags_return=${FLAGS_TRUE}
else
# see if the _flags_gFI_usName_ variable is a string as strings can be
@@ -466,7 +524,7 @@ _flags_getFlagInfo()
return ${flags_return}
}
-# Check for presense of item in a list.
+# Check for presence of item in a list.
#
# Passed a string (e.g. 'abc'), this function will determine if the string is
# present in the list of strings (e.g. ' foo bar abc ').
@@ -480,12 +538,10 @@ _flags_itemInList() {
_flags_str_=$1
shift
- echo " ${*:-} " |grep " ${_flags_str_} " >/dev/null
- if [ $? -eq 0 ]; then
- flags_return=${FLAGS_TRUE}
- else
- flags_return=${FLAGS_FALSE}
- fi
+ case " ${*:-} " in
+ *\ ${_flags_str_}\ *) flags_return=${FLAGS_TRUE} ;;
+ *) flags_return=${FLAGS_FALSE} ;;
+ esac
unset _flags_str_
return ${flags_return}
@@ -540,8 +596,7 @@ _flags_validBool()
# _flags_float_: float: value to validate
# Returns:
# bool: true if the value is a valid integer
-_flags_validFloat()
-{
+_flags_validFloat() {
flags_return=${FLAGS_FALSE}
[ -n "$1" ] || return ${flags_return}
_flags_float_=$1
@@ -560,11 +615,11 @@ _flags_validFloat()
flags_return=${FLAGS_TRUE}
case ${_flags_float_} in
-*) # negative floats
- _flags_test_=`${FLAGS_EXPR_CMD} -- "${_flags_float_}" :\
+ _flags_test_=`${FLAGS_EXPR_CMD} "${_flags_float_}" :\
'\(-[0-9]*\.[0-9]*\)'`
;;
*) # positive floats
- _flags_test_=`${FLAGS_EXPR_CMD} -- "${_flags_float_}" :\
+ _flags_test_=`${FLAGS_EXPR_CMD} "${_flags_float_}" :\
'\([0-9]*\.[0-9]*\)'`
;;
esac
@@ -594,7 +649,7 @@ _flags_validInt()
if _flags_useBuiltin; then
_flags_int_=${_flags_int_#-}
else
- _flags_int_=`${FLAGS_EXPR_CMD} -- "${_flags_int_}" : '-\([0-9][0-9]*\)'`
+ _flags_int_=`${FLAGS_EXPR_CMD} "${_flags_int_}" : '-\([0-9][0-9]*\)'`
fi
;;
esac
@@ -726,7 +781,7 @@ _flags_parseGetopt()
if _flags_useBuiltin; then
_flags_opt_=${_flags_opt_#*--}
else
- _flags_opt_=`${FLAGS_EXPR_CMD} -- "${_flags_opt_}" : '--\(.*\)'`
+ _flags_opt_=`${FLAGS_EXPR_CMD} "${_flags_opt_}" : '--\(.*\)'`
fi
_flags_len_=${__FLAGS_LEN_LONG}
if _flags_itemInList "${_flags_opt_}" ${__flags_longNames}; then
@@ -737,7 +792,7 @@ _flags_parseGetopt()
if _flags_useBuiltin; then
_flags_name_=${_flags_opt_#*no}
else
- _flags_name_=`${FLAGS_EXPR_CMD} -- "${_flags_opt_}" : 'no\(.*\)'`
+ _flags_name_=`${FLAGS_EXPR_CMD} "${_flags_opt_}" : 'no\(.*\)'`
fi
_flags_type_=${__FLAGS_TYPE_BOOLEAN}
_flags_arg_=${__FLAGS_NULL}
@@ -749,7 +804,7 @@ _flags_parseGetopt()
if _flags_useBuiltin; then
_flags_opt_=${_flags_opt_#*-}
else
- _flags_opt_=`${FLAGS_EXPR_CMD} -- "${_flags_opt_}" : '-\(.*\)'`
+ _flags_opt_=`${FLAGS_EXPR_CMD} "${_flags_opt_}" : '-\(.*\)'`
fi
_flags_len_=${__FLAGS_LEN_SHORT}
if _flags_itemInList "${_flags_opt_}" ${__flags_shortNames}; then
@@ -826,12 +881,12 @@ _flags_parseGetopt()
if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then
flags_help
flags_error='help requested'
- flags_return=${FLAGS_TRUE}
+ flags_return=${FLAGS_FALSE}
break
fi
fi
- # shift the option and non-boolean arguements out.
+ # shift the option and non-boolean arguments out.
shift
[ ${_flags_type_} != ${__FLAGS_TYPE_BOOLEAN} ] && shift
done
@@ -856,8 +911,7 @@ _flags_parseGetopt()
# integer: the result
# Returns:
# bool: success of math evaluation
-_flags_math()
-{
+_flags_math() {
if [ $# -eq 0 ]; then
flags_return=${FLAGS_FALSE}
elif _flags_useBuiltin; then
@@ -892,7 +946,7 @@ _flags_strlen()
elif _flags_useBuiltin; then
flags_output=${#_flags_str_}
else
- flags_output=`${FLAGS_EXPR_CMD} -- "${_flags_str_}" : '.*'`
+ flags_output=`${FLAGS_EXPR_CMD} "${_flags_str_}" : '.*'`
fi
flags_return=$?
@@ -907,18 +961,15 @@ _flags_strlen()
# None
# Returns:
# bool: true if built-ins should be used
-_flags_useBuiltin()
-{
- return ${__FLAGS_USE_BUILTIN}
-}
+_flags_useBuiltin() { return ${__FLAGS_USE_BUILTIN}; }
#------------------------------------------------------------------------------
# public functions
-#
+#
# A basic boolean flag. Boolean flags do not take any arguments, and their
# value is either 1 (false) or 0 (true). For long flags, the false value is
# specified on the command line by prepending the word 'no'. With short flags,
-# the presense of the flag toggles the current value between true and false.
+# the presence of the flag toggles the current value between true and false.
# Specifying a short boolean flag twice on the command results in returning the
# value back to the default value.
#
@@ -1146,11 +1197,21 @@ flags_reset()
eval ${flags_strToEval_}
done
- # reset internal variables
+ # Reset internal variables.
__flags_boolNames=' '
__flags_longNames=' '
__flags_shortNames=' '
__flags_definedNames=' '
+ # Reset logging level back to default.
+ flags_setLoggingLevel ${__FLAGS_LEVEL_DEFAULT}
+
unset flags_name_ flags_type_ flags_strToEval_ flags_usName_
}
+
+#
+# Initialization
+#
+
+# Set the default logging level.
+flags_setLoggingLevel ${__FLAGS_LEVEL_DEFAULT}
diff --git a/lib/shunit2 b/lib/shunit2
index 590a5a8..0455d2f 100644
--- a/lib/shunit2
+++ b/lib/shunit2
@@ -1,95 +1,141 @@
#! /bin/sh
-# $Id: shunit2 322 2011-04-24 00:09:45Z kate.ward@forestent.com $
# vim:et:ft=sh:sts=2:sw=2
#
-# Copyright 2008 Kate Ward. All Rights Reserved.
-# Released under the LGPL (GNU Lesser General Public License)
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
#
# shUnit2 -- Unit testing framework for Unix shell scripts.
-# http://code.google.com/p/shunit2/
+# https://github.com/kward/shunit2
#
# Author: kate.ward@forestent.com (Kate Ward)
#
# shUnit2 is a xUnit based unit test framework for Bourne shell scripts. It is
# based on the popular JUnit unit testing framework for Java.
+#
+# $() are not fully portable (POSIX != portable).
+# shellcheck disable=SC2006
+# expr may be antiquated, but it is the only solution in some cases.
+# shellcheck disable=SC2003
+# Commands are purposely escaped so they can be mocked outside shUnit2.
+# shellcheck disable=SC1001,SC1012
-# return if shunit already loaded
-[ -n "${SHUNIT_VERSION:-}" ] && exit 0
-
-SHUNIT_VERSION='2.1.6'
+# Return if shunit2 already loaded.
+\[ -n "${SHUNIT_VERSION:-}" ] && exit 0
+SHUNIT_VERSION='2.1.7pre'
+# Return values that scripts can use.
SHUNIT_TRUE=0
SHUNIT_FALSE=1
SHUNIT_ERROR=2
-# enable strict mode by default
+# Logging functions.
+_shunit_warn() { echo "shunit2:WARN $*" >&2; }
+_shunit_error() { echo "shunit2:ERROR $*" >&2; }
+_shunit_fatal() { echo "shunit2:FATAL $*" >&2; exit ${SHUNIT_ERROR}; }
+
+# Determine some reasonable command defaults.
+__SHUNIT_UNAME_S=`uname -s`
+case "${__SHUNIT_UNAME_S}" in
+ BSD) __SHUNIT_CMD_EXPR='gexpr' ;;
+ *) __SHUNIT_CMD_EXPR='expr' ;;
+esac
+
+__SHUNIT_CMD_ECHO_ESC='echo -e'
+# shellcheck disable=SC2039
+\[ "`echo -e test`" = '-e test' ] && __SHUNIT_CMD_ECHO_ESC='echo'
+
+# Commands a user can override if needed.
+SHUNIT_CMD_EXPR=${SHUNIT_CMD_EXPR:-${__SHUNIT_CMD_EXPR}}
+
+# Enable strict mode by default.
SHUNIT_STRICT=${SHUNIT_STRICT:-${SHUNIT_TRUE}}
-_shunit_warn() { echo "shunit2:WARN $@" >&2; }
-_shunit_error() { echo "shunit2:ERROR $@" >&2; }
-_shunit_fatal() { echo "shunit2:FATAL $@" >&2; exit ${SHUNIT_ERROR}; }
+# Enable color output. Options are 'never', 'always', or 'auto'.
+SHUNIT_COLOR=${SHUNIT_COLOR:-auto}
-# specific shell checks
-if [ -n "${ZSH_VERSION:-}" ]; then
+# Specific shell checks.
+if \[ -n "${ZSH_VERSION:-}" ]; then
setopt |grep "^shwordsplit$" >/dev/null
- if [ $? -ne ${SHUNIT_TRUE} ]; then
+ if \[ $? -ne ${SHUNIT_TRUE} ]; then
_shunit_fatal 'zsh shwordsplit option is required for proper operation'
fi
- if [ -z "${SHUNIT_PARENT:-}" ]; then
+ if \[ -z "${SHUNIT_PARENT:-}" ]; then
_shunit_fatal "zsh does not pass \$0 through properly. please declare \
\"SHUNIT_PARENT=\$0\" before calling shUnit2"
fi
fi
#
-# constants
+# Constants
#
-__SHUNIT_ASSERT_MSG_PREFIX='ASSERT:'
__SHUNIT_MODE_SOURCED='sourced'
__SHUNIT_MODE_STANDALONE='standalone'
__SHUNIT_PARENT=${SHUNIT_PARENT:-$0}
-# set the constants readonly
-shunit_constants_=`set |grep '^__SHUNIT_' |cut -d= -f1`
-echo "${shunit_constants_}" |grep '^Binary file' >/dev/null && \
- shunit_constants_=`set |grep -a '^__SHUNIT_' |cut -d= -f1`
-for shunit_constant_ in ${shunit_constants_}; do
- shunit_ro_opts_=''
- case ${ZSH_VERSION:-} in
- '') ;; # this isn't zsh
- [123].*) ;; # early versions (1.x, 2.x, 3.x)
- *) shunit_ro_opts_='-g' ;; # all later versions. declare readonly globally
- esac
- readonly ${shunit_ro_opts_} ${shunit_constant_}
+# ANSI colors.
+__SHUNIT_ANSI_NONE='\033[0m'
+__SHUNIT_ANSI_RED='\033[1;31m'
+__SHUNIT_ANSI_GREEN='\033[1;32m'
+__SHUNIT_ANSI_YELLOW='\033[1;33m'
+__SHUNIT_ANSI_CYAN='\033[1;36m'
+
+# Set the constants readonly.
+__shunit_constants=`set |grep '^__SHUNIT_' |cut -d= -f1`
+echo "${__shunit_constants}" |grep '^Binary file' >/dev/null && \
+ __shunit_constants=`set |grep -a '^__SHUNIT_' |cut -d= -f1`
+for __shunit_const in ${__shunit_constants}; do
+ if \[ -z "${ZSH_VERSION:-}" ]; then
+ readonly "${__shunit_const}"
+ else
+ case ${ZSH_VERSION} in
+ [123].*) readonly "${__shunit_const}" ;;
+ *) readonly -g "${__shunit_const}" # Declare readonly constants globally.
+ esac
+ fi
done
-unset shunit_constant_ shunit_constants_ shunit_ro_opts_
+unset __shunit_const __shunit_constants
+
+#
+# Internal variables.
+#
-# variables
-__shunit_lineno='' # line number of executed test
-__shunit_mode=${__SHUNIT_MODE_SOURCED} # operating mode
-__shunit_reportGenerated=${SHUNIT_FALSE} # is report generated
-__shunit_script='' # filename of unittest script (standalone mode)
-__shunit_skip=${SHUNIT_FALSE} # is skipping enabled
-__shunit_suite='' # suite of tests to execute
+# Variables.
+__shunit_lineno='' # Line number of executed test.
+__shunit_mode=${__SHUNIT_MODE_SOURCED} # Operating mode.
+__shunit_reportGenerated=${SHUNIT_FALSE} # Is report generated.
+__shunit_script='' # Filename of unittest script (standalone mode).
+__shunit_skip=${SHUNIT_FALSE} # Is skipping enabled.
+__shunit_suite='' # Suite of tests to execute.
-# counts of tests
+# ANSI colors (populated by _shunit_configureColor()).
+__shunit_ansi_none=''
+__shunit_ansi_red=''
+__shunit_ansi_green=''
+__shunit_ansi_yellow=''
+__shunit_ansi_cyan=''
+
+# Counts of tests.
__shunit_testSuccess=${SHUNIT_TRUE}
__shunit_testsTotal=0
__shunit_testsPassed=0
__shunit_testsFailed=0
-# counts of asserts
+# Counts of asserts.
__shunit_assertsTotal=0
__shunit_assertsPassed=0
__shunit_assertsFailed=0
__shunit_assertsSkipped=0
-# macros
-_SHUNIT_LINENO_='eval __shunit_lineno=""; if [ "${1:-}" = "--lineno" ]; then [ -n "$2" ] && __shunit_lineno="[$2] "; shift 2; fi'
+#
+# Macros.
+#
+
+# shellcheck disable=SC2016,SC2089
+_SHUNIT_LINENO_='eval __shunit_lineno=""; if \[ "${1:-}" = "--lineno" ]; then \[ -n "$2" ] && __shunit_lineno="[$2] "; shift 2; fi'
#-----------------------------------------------------------------------------
-# assert functions
+# Assertion functions.
#
# Assert that two values are equal to one another.
@@ -100,18 +146,17 @@ _SHUNIT_LINENO_='eval __shunit_lineno=""; if [ "${1:-}" = "--lineno" ]; then [ -
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertEquals()
-{
+assertEquals() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "assertEquals() requires two or three arguments; $# given"
- _shunit_error "1: ${1:+$1} 2: ${2:+$2} 3: ${3:+$3}"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -119,7 +164,7 @@ assertEquals()
shunit_actual_=$2
shunit_return=${SHUNIT_TRUE}
- if [ "${shunit_expected_}" = "${shunit_actual_}" ]; then
+ if \[ "${shunit_expected_}" = "${shunit_actual_}" ]; then
_shunit_assertPass
else
failNotEquals "${shunit_message_}" "${shunit_expected_}" "${shunit_actual_}"
@@ -129,6 +174,7 @@ assertEquals()
unset shunit_message_ shunit_expected_ shunit_actual_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_EQUALS_='eval assertEquals --lineno "${LINENO:-}"'
# Assert that two values are not equal to one another.
@@ -139,17 +185,17 @@ _ASSERT_EQUALS_='eval assertEquals --lineno "${LINENO:-}"'
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertNotEquals()
-{
+assertNotEquals() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "assertNotEquals() requires two or three arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -157,7 +203,7 @@ assertNotEquals()
shunit_actual_=$2
shunit_return=${SHUNIT_TRUE}
- if [ "${shunit_expected_}" != "${shunit_actual_}" ]; then
+ if \[ "${shunit_expected_}" != "${shunit_actual_}" ]; then
_shunit_assertPass
else
failSame "${shunit_message_}" "$@"
@@ -167,6 +213,7 @@ assertNotEquals()
unset shunit_message_ shunit_expected_ shunit_actual_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_NOT_EQUALS_='eval assertNotEquals --lineno "${LINENO:-}"'
# Assert that a value is null (i.e. an empty string)
@@ -176,17 +223,17 @@ _ASSERT_NOT_EQUALS_='eval assertNotEquals --lineno "${LINENO:-}"'
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertNull()
-{
+assertNull() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 1 -o $# -gt 2 ]; then
+ if \[ $# -lt 1 -o $# -gt 2 ]; then
_shunit_error "assertNull() requires one or two arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 2 ]; then
+ if \[ $# -eq 2 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -196,6 +243,7 @@ assertNull()
unset shunit_message_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_NULL_='eval assertNull --lineno "${LINENO:-}"'
# Assert that a value is not null (i.e. a non-empty string)
@@ -207,15 +255,16 @@ _ASSERT_NULL_='eval assertNull --lineno "${LINENO:-}"'
# integer: success (TRUE/FALSE/ERROR constant)
assertNotNull()
{
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -gt 2 ]; then # allowing 0 arguments as $1 might actually be null
+ if \[ $# -gt 2 ]; then # allowing 0 arguments as $1 might actually be null
_shunit_error "assertNotNull() requires one or two arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 2 ]; then
+ if \[ $# -eq 2 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -227,6 +276,7 @@ assertNotNull()
unset shunit_actual_ shunit_message_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_NOT_NULL_='eval assertNotNull --lineno "${LINENO:-}"'
# Assert that two values are the same (i.e. equal to one another).
@@ -237,17 +287,17 @@ _ASSERT_NOT_NULL_='eval assertNotNull --lineno "${LINENO:-}"'
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertSame()
-{
+assertSame() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "assertSame() requires two or three arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -257,6 +307,7 @@ assertSame()
unset shunit_message_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_SAME_='eval assertSame --lineno "${LINENO:-}"'
# Assert that two values are not the same (i.e. not equal to one another).
@@ -267,17 +318,17 @@ _ASSERT_SAME_='eval assertSame --lineno "${LINENO:-}"'
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertNotSame()
-{
+assertNotSame() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "assertNotSame() requires two or three arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_:-}$1"
shift
fi
@@ -287,6 +338,7 @@ assertNotSame()
unset shunit_message_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_NOT_SAME_='eval assertNotSame --lineno "${LINENO:-}"'
# Assert that a value or shell test condition is true.
@@ -301,49 +353,49 @@ _ASSERT_NOT_SAME_='eval assertNotSame --lineno "${LINENO:-}"'
# The following test will succeed:
# assertTrue 0
# assertTrue "[ 34 -gt 23 ]"
-# The folloing test will fail with a message:
+# The following test will fail with a message:
# assertTrue 123
-# assertTrue "test failed" "[ -r '/non/existant/file' ]"
+# assertTrue "test failed" "[ -r '/non/existent/file' ]"
#
# Args:
# message: string: failure message [optional]
# condition: string: integer value or shell conditional statement
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertTrue()
-{
+assertTrue() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -gt 2 ]; then
- _shunit_error "assertTrue() takes one two arguments; $# given"
+ if \[ $# -lt 1 -o $# -gt 2 ]; then
+ _shunit_error "assertTrue() takes one or two arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 2 ]; then
+ if \[ $# -eq 2 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
shunit_condition_=$1
- # see if condition is an integer, i.e. a return value
+ # See if condition is an integer, i.e. a return value.
shunit_match_=`expr "${shunit_condition_}" : '\([0-9]*\)'`
shunit_return=${SHUNIT_TRUE}
- if [ -z "${shunit_condition_}" ]; then
- # null condition
+ if \[ -z "${shunit_condition_}" ]; then
+ # Null condition.
shunit_return=${SHUNIT_FALSE}
- elif [ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ]
+ elif \[ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ]
then
- # possible return value. treating 0 as true, and non-zero as false.
- [ ${shunit_condition_} -ne 0 ] && shunit_return=${SHUNIT_FALSE}
+ # Possible return value. Treating 0 as true, and non-zero as false.
+ \[ "${shunit_condition_}" -ne 0 ] && shunit_return=${SHUNIT_FALSE}
else
- # (hopefully) a condition
- ( eval ${shunit_condition_} ) >/dev/null 2>&1
- [ $? -ne 0 ] && shunit_return=${SHUNIT_FALSE}
+ # Hopefully... a condition.
+ ( eval "${shunit_condition_}" ) >/dev/null 2>&1
+ \[ $? -ne 0 ] && shunit_return=${SHUNIT_FALSE}
fi
- # record the test
- if [ ${shunit_return} -eq ${SHUNIT_TRUE} ]; then
+ # Record the test.
+ if \[ ${shunit_return} -eq ${SHUNIT_TRUE} ]; then
_shunit_assertPass
else
_shunit_assertFail "${shunit_message_}"
@@ -352,6 +404,7 @@ assertTrue()
unset shunit_message_ shunit_condition_ shunit_match_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_TRUE_='eval assertTrue --lineno "${LINENO:-}"'
# Assert that a value or shell test condition is false.
@@ -366,7 +419,7 @@ _ASSERT_TRUE_='eval assertTrue --lineno "${LINENO:-}"'
# The following test will succeed:
# assertFalse 1
# assertFalse "[ 'apples' = 'oranges' ]"
-# The folloing test will fail with a message:
+# The following test will fail with a message:
# assertFalse 0
# assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]"
#
@@ -375,52 +428,53 @@ _ASSERT_TRUE_='eval assertTrue --lineno "${LINENO:-}"'
# condition: string: integer value or shell conditional statement
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-assertFalse()
-{
+assertFalse() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 1 -o $# -gt 2 ]; then
+ if \[ $# -lt 1 -o $# -gt 2 ]; then
_shunit_error "assertFalse() quires one or two arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 2 ]; then
+ if \[ $# -eq 2 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
shunit_condition_=$1
- # see if condition is an integer, i.e. a return value
+ # See if condition is an integer, i.e. a return value.
shunit_match_=`expr "${shunit_condition_}" : '\([0-9]*\)'`
shunit_return=${SHUNIT_TRUE}
- if [ -z "${shunit_condition_}" ]; then
- # null condition
+ if \[ -z "${shunit_condition_}" ]; then
+ # Null condition.
shunit_return=${SHUNIT_FALSE}
- elif [ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ]
+ elif \[ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ]
then
- # possible return value. treating 0 as true, and non-zero as false.
- [ ${shunit_condition_} -eq 0 ] && shunit_return=${SHUNIT_FALSE}
+ # Possible return value. Treating 0 as true, and non-zero as false.
+ \[ "${shunit_condition_}" -eq 0 ] && shunit_return=${SHUNIT_FALSE}
else
- # (hopefully) a condition
- ( eval ${shunit_condition_} ) >/dev/null 2>&1
- [ $? -eq 0 ] && shunit_return=${SHUNIT_FALSE}
+ # Hopefully... a condition.
+ ( eval "${shunit_condition_}" ) >/dev/null 2>&1
+ \[ $? -eq 0 ] && shunit_return=${SHUNIT_FALSE}
fi
- # record the test
- if [ ${shunit_return} -eq ${SHUNIT_TRUE} ]; then
+ # Record the test.
+ if \[ "${shunit_return}" -eq "${SHUNIT_TRUE}" ]; then
_shunit_assertPass
else
_shunit_assertFail "${shunit_message_}"
fi
unset shunit_message_ shunit_condition_ shunit_match_
- return ${shunit_return}
+ return "${shunit_return}"
}
+# shellcheck disable=SC2016,SC2034
_ASSERT_FALSE_='eval assertFalse --lineno "${LINENO:-}"'
#-----------------------------------------------------------------------------
-# failure functions
+# Failure functions.
#
# Records a test failure.
@@ -429,17 +483,17 @@ _ASSERT_FALSE_='eval assertFalse --lineno "${LINENO:-}"'
# message: string: failure message [optional]
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-fail()
-{
+fail() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -gt 1 ]; then
+ if \[ $# -gt 1 ]; then
_shunit_error "fail() requires zero or one arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 1 ]; then
+ if \[ $# -eq 1 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -449,6 +503,7 @@ fail()
unset shunit_message_
return ${SHUNIT_FALSE}
}
+# shellcheck disable=SC2016,SC2034
_FAIL_='eval fail --lineno "${LINENO:-}"'
# Records a test failure, stating two values were not equal.
@@ -459,17 +514,17 @@ _FAIL_='eval fail --lineno "${LINENO:-}"'
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-failNotEquals()
-{
+failNotEquals() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "failNotEquals() requires one or two arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -481,6 +536,7 @@ failNotEquals()
unset shunit_message_ shunit_expected_ shunit_actual_
return ${SHUNIT_FALSE}
}
+# shellcheck disable=SC2016,SC2034
_FAIL_NOT_EQUALS_='eval failNotEquals --lineno "${LINENO:-}"'
# Records a test failure, stating two values should have been the same.
@@ -493,15 +549,16 @@ _FAIL_NOT_EQUALS_='eval failNotEquals --lineno "${LINENO:-}"'
# integer: success (TRUE/FALSE/ERROR constant)
failSame()
{
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "failSame() requires two or three arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -511,6 +568,7 @@ failSame()
unset shunit_message_
return ${SHUNIT_FALSE}
}
+# shellcheck disable=SC2016,SC2034
_FAIL_SAME_='eval failSame --lineno "${LINENO:-}"'
# Records a test failure, stating two values were not equal.
@@ -523,17 +581,17 @@ _FAIL_SAME_='eval failSame --lineno "${LINENO:-}"'
# actual: string: actual value
# Returns:
# integer: success (TRUE/FALSE/ERROR constant)
-failNotSame()
-{
+failNotSame() {
+ # shellcheck disable=SC2090
${_SHUNIT_LINENO_}
- if [ $# -lt 2 -o $# -gt 3 ]; then
+ if \[ $# -lt 2 -o $# -gt 3 ]; then
_shunit_error "failNotEquals() requires one or two arguments; $# given"
return ${SHUNIT_ERROR}
fi
_shunit_shouldSkip && return ${SHUNIT_TRUE}
shunit_message_=${__shunit_lineno}
- if [ $# -eq 3 ]; then
+ if \[ $# -eq 3 ]; then
shunit_message_="${shunit_message_}$1"
shift
fi
@@ -543,10 +601,11 @@ failNotSame()
unset shunit_message_
return ${shunit_return}
}
+# shellcheck disable=SC2016,SC2034
_FAIL_NOT_SAME_='eval failNotSame --lineno "${LINENO:-}"'
#-----------------------------------------------------------------------------
-# skipping functions
+# Skipping functions.
#
# Force remaining assert and fail functions to be "skipped".
@@ -557,19 +616,13 @@ _FAIL_NOT_SAME_='eval failNotSame --lineno "${LINENO:-}"'
#
# Args:
# None
-startSkipping()
-{
- __shunit_skip=${SHUNIT_TRUE}
-}
+startSkipping() { __shunit_skip=${SHUNIT_TRUE}; }
# Resume the normal recording behavior of assert and fail calls.
#
# Args:
# None
-endSkipping()
-{
- __shunit_skip=${SHUNIT_FALSE}
-}
+endSkipping() { __shunit_skip=${SHUNIT_FALSE}; }
# Returns the state of assert and fail call skipping.
#
@@ -577,13 +630,10 @@ endSkipping()
# None
# Returns:
# boolean: (TRUE/FALSE constant)
-isSkipping()
-{
- return ${__shunit_skip}
-}
+isSkipping() { return ${__shunit_skip}; }
#-----------------------------------------------------------------------------
-# suite functions
+# Suite functions.
#
# Stub. This function should contains all unit test calls to be made.
@@ -610,8 +660,7 @@ isSkipping()
#
# Args:
# function: string: name of a function to add to current unit test suite
-suite_addTest()
-{
+suite_addTest() {
shunit_func_=${1:-}
__shunit_suite="${__shunit_suite:+${__shunit_suite} }${shunit_func_}"
@@ -653,7 +702,7 @@ suite_addTest()
#
# Args:
# None
-#setUp() { :; }
+#setUp() { :; } # DO NOT UNCOMMENT THIS FUNCTION
# Note: see _shunit_mktempFunc() for actual implementation
# Stub. This function will be called after each test is run.
@@ -668,41 +717,41 @@ suite_addTest()
#tearDown() { :; } # DO NOT UNCOMMENT THIS FUNCTION
#------------------------------------------------------------------------------
-# internal shUnit2 functions
+# Internal shUnit2 functions.
#
# Create a temporary directory to store various run-time files in.
#
# This function is a cross-platform temporary directory creation tool. Not all
-# OSes have the mktemp function, so one is included here.
+# OSes have the `mktemp` function, so one is included here.
#
# Args:
# None
# Outputs:
# string: the temporary directory that was created
-_shunit_mktempDir()
-{
- # try the standard mktemp function
+_shunit_mktempDir() {
+ # Try the standard `mktemp` function.
( exec mktemp -dqt shunit.XXXXXX 2>/dev/null ) && return
- # the standard mktemp didn't work. doing our own.
- if [ -r '/dev/urandom' -a -x '/usr/bin/od' ]; then
+ # The standard `mktemp` didn't work. Use our own.
+ # shellcheck disable=SC2039
+ if \[ -r '/dev/urandom' -a -x '/usr/bin/od' ]; then
_shunit_random_=`/usr/bin/od -vAn -N4 -tx4 </dev/urandom \
|sed 's/^[^0-9a-f]*//'`
- elif [ -n "${RANDOM:-}" ]; then
+ elif \[ -n "${RANDOM:-}" ]; then
# $RANDOM works
_shunit_random_=${RANDOM}${RANDOM}${RANDOM}$$
else
- # $RANDOM doesn't work
+ # `$RANDOM` doesn't work.
_shunit_date_=`date '+%Y%m%d%H%M%S'`
- _shunit_random_=`expr ${_shunit_date_} / $$`
+ _shunit_random_=`expr "${_shunit_date_}" / $$`
fi
_shunit_tmpDir_="${TMPDIR:-/tmp}/shunit.${_shunit_random_}"
- ( umask 077 && mkdir "${_shunit_tmpDir_}" ) || \
+ ( umask 077 && \mkdir "${_shunit_tmpDir_}" ) || \
_shunit_fatal 'could not create temporary directory! exiting'
- echo ${_shunit_tmpDir_}
+ echo "${_shunit_tmpDir_}"
unset _shunit_date_ _shunit_random_ _shunit_tmpDir_
}
@@ -710,16 +759,15 @@ _shunit_mktempDir()
#
# Args:
# None
-_shunit_mktempFunc()
-{
+_shunit_mktempFunc() {
for _shunit_func_ in oneTimeSetUp oneTimeTearDown setUp tearDown suite noexec
do
_shunit_file_="${__shunit_tmpDir}/${_shunit_func_}"
- cat <<EOF >"${_shunit_file_}"
+ \cat <<EOF >"${_shunit_file_}"
#! /bin/sh
exit ${SHUNIT_TRUE}
EOF
- chmod +x "${_shunit_file_}"
+ \chmod +x "${_shunit_file_}"
done
unset _shunit_file_
@@ -733,8 +781,7 @@ EOF
#
# Args:
# name: string: name of the trap called (specified when trap defined)
-_shunit_cleanup()
-{
+_shunit_cleanup() {
_shunit_name_=$1
case ${_shunit_name_} in
@@ -742,22 +789,22 @@ _shunit_cleanup()
INT) _shunit_signal_=2 ;;
TERM) _shunit_signal_=15 ;;
*)
- _shunit_warn "unrecognized trap value (${_shunit_name_})"
+ _shunit_error "unrecognized trap value (${_shunit_name_})"
_shunit_signal_=0
;;
esac
- # do our work
- rm -fr "${__shunit_tmpDir}"
+ # Do our work.
+ \rm -fr "${__shunit_tmpDir}"
- # exit for all non-EXIT signals
- if [ ${_shunit_name_} != 'EXIT' ]; then
+ # Exit for all non-EXIT signals.
+ if \[ "${_shunit_name_}" != 'EXIT' ]; then
_shunit_warn "trapped and now handling the (${_shunit_name_}) signal"
- # disable EXIT trap
+ # Disable EXIT trap.
trap 0
- # add 128 to signal and exit
- exit `expr ${_shunit_signal_} + 128`
- elif [ ${__shunit_reportGenerated} -eq ${SHUNIT_FALSE} ] ; then
+ # Add 128 to signal and exit.
+ exit "`expr "${_shunit_signal_}" + 128`"
+ elif \[ ${__shunit_reportGenerated} -eq ${SHUNIT_FALSE} ] ; then
_shunit_assertFail 'Unknown failure encountered running a test'
_shunit_generateReport
exit ${SHUNIT_ERROR}
@@ -766,12 +813,51 @@ _shunit_cleanup()
unset _shunit_name_ _shunit_signal_
}
+# configureOutput based on user preferences, e.g. color.
+#
+# Args:
+# color: string: color mode (one of `always`, `auto`, or `none`).
+_shunit_configureColor() {
+ _shunit_color_=${SHUNIT_FALSE} # By default, no color.
+ case $1 in
+ 'always') _shunit_color_=${SHUNIT_TRUE} ;;
+ 'auto')
+ ( exec tput >/dev/null 2>&1 ) # Check for existence of tput command.
+ if [ $? -lt 127 ]; then
+ _shunit_tput_=`tput colors`
+ # shellcheck disable=SC2166,SC2181
+ [ $? -eq 0 -a "${_shunit_tput_}" -ge 16 ] && _shunit_color_=${SHUNIT_TRUE}
+ fi
+ ;;
+ 'none') ;;
+ *) _shunit_fatal "unrecognized SHUNIT_COLOR option '${SHUNIT_COLOR}'" ;;
+ esac
+
+ case ${_shunit_color_} in
+ ${SHUNIT_TRUE})
+ __shunit_ansi_none=${__SHUNIT_ANSI_NONE}
+ __shunit_ansi_red=${__SHUNIT_ANSI_RED}
+ __shunit_ansi_green=${__SHUNIT_ANSI_GREEN}
+ __shunit_ansi_yellow=${__SHUNIT_ANSI_YELLOW}
+ __shunit_ansi_cyan=${__SHUNIT_ANSI_CYAN}
+ ;;
+ ${SHUNIT_FALSE})
+ __shunit_ansi_none=''
+ __shunit_ansi_red=''
+ __shunit_ansi_green=''
+ __shunit_ansi_yellow=''
+ __shunit_ansi_cyan=''
+ ;;
+ esac
+
+ unset _shunit_color_ _shunit_tput_
+}
+
# The actual running of the tests happens here.
#
# Args:
# None
-_shunit_execSuite()
-{
+_shunit_execSuite() {
for _shunit_test_ in ${__shunit_suite}; do
__shunit_testSuccess=${SHUNIT_TRUE}
@@ -783,13 +869,13 @@ _shunit_execSuite()
# execute the test
echo "${_shunit_test_}"
- eval ${_shunit_test_}
+ eval "${_shunit_test_}"
# execute the per-test tear-down function
tearDown
# update stats
- if [ ${__shunit_testSuccess} -eq ${SHUNIT_TRUE} ]; then
+ if \[ ${__shunit_testSuccess} -eq ${SHUNIT_TRUE} ]; then
__shunit_testsPassed=`expr ${__shunit_testsPassed} + 1`
else
__shunit_testsFailed=`expr ${__shunit_testsFailed} + 1`
@@ -805,42 +891,43 @@ _shunit_execSuite()
# None
# Output:
# string: the report of successful and failed tests, as well as totals.
-_shunit_generateReport()
-{
+_shunit_generateReport() {
_shunit_ok_=${SHUNIT_TRUE}
- # if no exit code was provided one, determine an appropriate one
- [ ${__shunit_testsFailed} -gt 0 \
+ # If no exit code was provided one, determine an appropriate one.
+ \[ "${__shunit_testsFailed}" -gt 0 \
-o ${__shunit_testSuccess} -eq ${SHUNIT_FALSE} ] \
&& _shunit_ok_=${SHUNIT_FALSE}
echo
- if [ ${__shunit_testsTotal} -eq 1 ]; then
- echo "Ran ${__shunit_testsTotal} test."
+ _shunit_msg_="Ran ${__shunit_ansi_cyan}${__shunit_testsTotal}${__shunit_ansi_none}"
+ if \[ "${__shunit_testsTotal}" -eq 1 ]; then
+ ${__SHUNIT_CMD_ECHO_ESC} "${_shunit_msg_} test."
else
- echo "Ran ${__shunit_testsTotal} tests."
+ ${__SHUNIT_CMD_ECHO_ESC} "${_shunit_msg_} tests."
fi
_shunit_failures_=''
_shunit_skipped_=''
- [ ${__shunit_assertsFailed} -gt 0 ] \
+ \[ ${__shunit_assertsFailed} -gt 0 ] \
&& _shunit_failures_="failures=${__shunit_assertsFailed}"
- [ ${__shunit_assertsSkipped} -gt 0 ] \
+ \[ ${__shunit_assertsSkipped} -gt 0 ] \
&& _shunit_skipped_="skipped=${__shunit_assertsSkipped}"
- if [ ${_shunit_ok_} -eq ${SHUNIT_TRUE} ]; then
- _shunit_msg_='OK'
- [ -n "${_shunit_skipped_}" ] \
- && _shunit_msg_="${_shunit_msg_} (${_shunit_skipped_})"
+ if \[ ${_shunit_ok_} -eq ${SHUNIT_TRUE} ]; then
+ _shunit_msg_="${__shunit_ansi_green}OK${__shunit_ansi_none}"
+ \[ -n "${_shunit_skipped_}" ] \
+ && _shunit_msg_="${_shunit_msg_} (${__shunit_ansi_yellow}${_shunit_skipped_}${__shunit_ansi_none})"
else
- _shunit_msg_="FAILED (${_shunit_failures_}"
- [ -n "${_shunit_skipped_}" ] \
- && _shunit_msg_="${_shunit_msg_},${_shunit_skipped_}"
+ _shunit_msg_="${__shunit_ansi_red}FAILED${__shunit_ansi_none}"
+ _shunit_msg_="${_shunit_msg_} (${__shunit_ansi_red}${_shunit_failures_}${__shunit_ansi_none}"
+ \[ -n "${_shunit_skipped_}" ] \
+ && _shunit_msg_="${_shunit_msg_},${__shunit_ansi_yellow}${_shunit_skipped_}${__shunit_ansi_none}"
_shunit_msg_="${_shunit_msg_})"
fi
echo
- echo ${_shunit_msg_}
+ ${__SHUNIT_CMD_ECHO_ESC} "${_shunit_msg_}"
__shunit_reportGenerated=${SHUNIT_TRUE}
unset _shunit_failures_ _shunit_msg_ _shunit_ok_ _shunit_skipped_
@@ -854,7 +941,7 @@ _shunit_generateReport()
# boolean: whether the test should be skipped (TRUE/FALSE constant)
_shunit_shouldSkip()
{
- [ ${__shunit_skip} -eq ${SHUNIT_FALSE} ] && return ${SHUNIT_FALSE}
+ \[ ${__shunit_skip} -eq ${SHUNIT_FALSE} ] && return ${SHUNIT_FALSE}
_shunit_assertSkip
}
@@ -862,8 +949,7 @@ _shunit_shouldSkip()
#
# Args:
# None
-_shunit_assertPass()
-{
+_shunit_assertPass() {
__shunit_assertsPassed=`expr ${__shunit_assertsPassed} + 1`
__shunit_assertsTotal=`expr ${__shunit_assertsTotal} + 1`
}
@@ -872,14 +958,14 @@ _shunit_assertPass()
#
# Args:
# message: string: failure message to provide user
-_shunit_assertFail()
-{
+_shunit_assertFail() {
_shunit_msg_=$1
__shunit_testSuccess=${SHUNIT_FALSE}
- __shunit_assertsFailed=`expr ${__shunit_assertsFailed} + 1`
- __shunit_assertsTotal=`expr ${__shunit_assertsTotal} + 1`
- echo "${__SHUNIT_ASSERT_MSG_PREFIX}${_shunit_msg_}"
+ __shunit_assertsFailed=`expr "${__shunit_assertsFailed}" + 1`
+ __shunit_assertsTotal=`expr "${__shunit_assertsTotal}" + 1`
+ ${__SHUNIT_CMD_ECHO_ESC} \
+ "${__shunit_ansi_red}ASSERT:${__shunit_ansi_none}${_shunit_msg_}"
unset _shunit_msg_
}
@@ -890,8 +976,8 @@ _shunit_assertFail()
# None
_shunit_assertSkip()
{
- __shunit_assertsSkipped=`expr ${__shunit_assertsSkipped} + 1`
- __shunit_assertsTotal=`expr ${__shunit_assertsTotal} + 1`
+ __shunit_assertsSkipped=`expr "${__shunit_assertsSkipped}" + 1`
+ __shunit_assertsTotal=`expr "${__shunit_assertsTotal}" + 1`
}
# Prepare a script filename for sourcing.
@@ -919,7 +1005,7 @@ _shunit_prepForSourcing()
# string: with escaped character(s)
_shunit_escapeCharInStr()
{
- [ -n "$2" ] || return # no point in doing work on an empty string
+ \[ -n "$2" ] || return # No point in doing work on an empty string.
# Note: using shorter variable names to prevent conflicts with
# _shunit_escapeCharactersInString().
@@ -927,7 +1013,8 @@ _shunit_escapeCharInStr()
_shunit_s_=$2
- # escape the character
+ # Escape the character.
+ # shellcheck disable=SC1003,SC2086
echo ''${_shunit_s_}'' |sed 's/\'${_shunit_c_}'/\\\'${_shunit_c_}'/g'
unset _shunit_c_ _shunit_s_
@@ -941,7 +1028,7 @@ _shunit_escapeCharInStr()
# string: with escaped character(s)
_shunit_escapeCharactersInString()
{
- [ -n "$1" ] || return # no point in doing work on an empty string
+ \[ -n "$1" ] || return # No point in doing work on an empty string.
_shunit_str_=$1
@@ -961,13 +1048,13 @@ _shunit_escapeCharactersInString()
# script: string: name of script to extract functions from
# Returns:
# string: of function names
-_shunit_extractTestFunctions()
-{
+_shunit_extractTestFunctions() {
_shunit_script_=$1
- # extract the lines with test function names, strip of anything besides the
+ # Extract the lines with test function names, strip of anything besides the
# function name, and output everything on a single line.
_shunit_regex_='^[ ]*(function )*test[A-Za-z0-9_]* *\(\)'
+ # shellcheck disable=SC2196
egrep "${_shunit_regex_}" "${_shunit_script_}" \
|sed 's/^[^A-Za-z0-9_]*//;s/^function //;s/\([A-Za-z0-9_]*\).*/\1/g' \
|xargs
@@ -976,73 +1063,72 @@ _shunit_extractTestFunctions()
}
#------------------------------------------------------------------------------
-# main
+# Main.
#
-# determine the operating mode
-if [ $# -eq 0 ]; then
+# Determine the operating mode.
+if \[ $# -eq 0 ]; then
__shunit_script=${__SHUNIT_PARENT}
__shunit_mode=${__SHUNIT_MODE_SOURCED}
else
__shunit_script=$1
- [ -r "${__shunit_script}" ] || \
+ \[ -r "${__shunit_script}" ] || \
_shunit_fatal "unable to read from ${__shunit_script}"
__shunit_mode=${__SHUNIT_MODE_STANDALONE}
fi
-# create a temporary storage location
+# Create a temporary storage location.
__shunit_tmpDir=`_shunit_mktempDir`
-# provide a public temporary directory for unit test scripts
-# TODO(kward): document this
+# Provide a public temporary directory for unit test scripts.
+# TODO(kward): document this.
SHUNIT_TMPDIR="${__shunit_tmpDir}/tmp"
-mkdir "${SHUNIT_TMPDIR}"
+\mkdir "${SHUNIT_TMPDIR}"
-# setup traps to clean up after ourselves
+# Setup traps to clean up after ourselves.
trap '_shunit_cleanup EXIT' 0
trap '_shunit_cleanup INT' 2
trap '_shunit_cleanup TERM' 15
-# create phantom functions to work around issues with Cygwin
+# Create phantom functions to work around issues with Cygwin.
_shunit_mktempFunc
PATH="${__shunit_tmpDir}:${PATH}"
-# make sure phantom functions are executable. this will bite if /tmp (or the
-# current $TMPDIR) points to a path on a partition that was mounted with the
-# 'noexec' option. the noexec command was created with _shunit_mktempFunc().
+# Make sure phantom functions are executable. This will bite if `/tmp` (or the
+# current `$TMPDIR`) points to a path on a partition that was mounted with the
+# 'noexec' option. The noexec command was created with `_shunit_mktempFunc()`.
noexec 2>/dev/null || _shunit_fatal \
- 'please declare TMPDIR with path on partition with exec permission'
+ 'Please declare TMPDIR with path on partition with exec permission.'
-# we must manually source the tests in standalone mode
-if [ "${__shunit_mode}" = "${__SHUNIT_MODE_STANDALONE}" ]; then
+# We must manually source the tests in standalone mode.
+if \[ "${__shunit_mode}" = "${__SHUNIT_MODE_STANDALONE}" ]; then
+ # shellcheck disable=SC1090
. "`_shunit_prepForSourcing \"${__shunit_script}\"`"
fi
-# execute the oneTimeSetUp function (if it exists)
+# Configure default output coloring behavior.
+_shunit_configureColor "${SHUNIT_COLOR}"
+
+# Execute the oneTimeSetUp function (if it exists).
oneTimeSetUp
-# execute the suite function defined in the parent test script
-# deprecated as of 2.1.0
+# Execute the suite function defined in the parent test script.
+# DEPRECATED as of 2.1.0.
suite
-# if no suite function was defined, dynamically build a list of functions
-if [ -z "${__shunit_suite}" ]; then
+# If no suite function was defined, dynamically build a list of functions.
+if \[ -z "${__shunit_suite}" ]; then
shunit_funcs_=`_shunit_extractTestFunctions "${__shunit_script}"`
for shunit_func_ in ${shunit_funcs_}; do
- suite_addTest ${shunit_func_}
+ suite_addTest "${shunit_func_}"
done
fi
unset shunit_func_ shunit_funcs_
-# execute the tests
_shunit_execSuite
-
-# execute the oneTimeTearDown function (if it exists)
oneTimeTearDown
-
-# generate the report
_shunit_generateReport
-# that's it folks
-[ ${__shunit_testsFailed} -eq 0 ]
+# That's it folks.
+\[ "${__shunit_testsFailed}" -eq 0 ]
exit $?
diff --git a/lib/versions b/lib/versions
index 9a3ffc1..ea46ccc 100755
--- a/lib/versions
+++ b/lib/versions
@@ -1,22 +1,27 @@
#! /bin/sh
-# $Id$
# vim:et:ft=sh:sts=2:sw=2
#
-# Copyright 2008-2016 Kate Ward. All Rights Reserved.
-# Released under the Apache License.
+# Versions determines the versions of all installed shells.
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 License.
#
# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shlib
#
# This library provides reusable functions that determine actual names and
# versions of installed shells and the OS. The library can also be run as a
-# script if set execuatable.
+# script if set executable.
+#
+# Disable checks that aren't fully portable (POSIX != portable).
+# shellcheck disable=SC2006
ARGV0=`basename "$0"`
LSB_RELEASE='/etc/lsb-release'
-VERSIONS_SHELLS="/bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/sh /bin/zsh"
+VERSIONS_SHELLS="ash /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/sh /bin/zsh"
-TRUE=0
-FALSE=1
+true; TRUE=$?
+false; FALSE=$?
ERROR=2
UNAME_R=`uname -r`
@@ -40,7 +45,7 @@ versions_osName() {
10.7|10.7.[0-9]*) os_name_='Mac OS X Lion' ;;
10.8|10.8.[0-9]*) os_name_='Mac OS X Mountain Lion' ;;
10.9|10.9.[0-9]*) os_name_='Mac OS X Mavericks' ;;
- 10.10|10.10.[0-9]*) os_name_='Mac OS X Yousemite' ;;
+ 10.10|10.10.[0-9]*) os_name_='Mac OS X Yosemite' ;;
10.11|10.11.[0-9]*) os_name_='Mac OS X El Capitan' ;;
10.12|10.12.[0-9]*) os_name_='macOS Sierra' ;;
10.13|10.13.[0-9]*) os_name_='macOS High Sierra' ;;
@@ -79,6 +84,7 @@ versions_osVersion() {
Linux)
if [ -r "${LSB_RELEASE}" ]; then
if grep -q 'DISTRIB_ID=Ubuntu' "${LSB_RELEASE}"; then
+ # shellcheck disable=SC2002
os_version_=`cat "${LSB_RELEASE}" \
|awk -F= '$1~/DISTRIB_DESCRIPTION/{print $2}' \
|sed 's/"//g;s/ /-/g'`
@@ -91,23 +97,32 @@ versions_osVersion() {
if grep 'OpenSolaris' /etc/release >/dev/null; then
os_version_=`grep 'OpenSolaris' /etc/release |awk '{print $2"("$3")"}'`
else
- major_=`echo ${os_release_} |sed 's/[0-9]*\.\([0-9]*\)/\1/'`
+ major_=`echo "${os_release_}" |sed 's/[0-9]*\.\([0-9]*\)/\1/'`
minor_=`grep Solaris /etc/release |sed 's/[^u]*\(u[0-9]*\).*/\1/'`
os_version_="${major_}${minor_}"
fi
;;
esac
- echo ${os_version_}
+ echo "${os_version_}"
unset os_name_ os_release_ os_version_ major_ minor_
}
versions_shellVersion() {
shell_=$1
- if [ ! -x "${shell_}" ]; then
+ shell_present_=${FALSE}
+ case "${shell_}" in
+ ash)
+ [ -x '/bin/busybox' ] && shell_present_=${TRUE}
+ ;;
+ *)
+ [ -x "${shell_}" ] && shell_present_=${TRUE}
+ ;;
+ esac
+ if [ ${shell_present_} -eq ${FALSE} ]; then
echo 'not installed'
- return
+ return ${FALSE}
fi
version_=''
@@ -121,23 +136,29 @@ versions_shellVersion() {
## pdksh is covered in versions_shell_ksh()
#[ -z "${version_}" ] && version_=`versions_shell_zsh ${shell_}`
;;
- */bash) version_=`versions_shell_bash ${shell_}` ;;
+ ash) version_=`versions_shell_ash "${shell_}"` ;;
+ */bash) version_=`versions_shell_bash "${shell_}"` ;;
*/dash)
# simply assuming Ubuntu Linux until somebody comes up with a better
# test. the following test will return an empty string if dash is not
# installed.
version_=`versions_shell_dash`
;;
- */ksh) version_=`versions_shell_ksh ${shell_}` ;;
- */pdksh) version_=`versions_shell_pdksh ${shell_}` ;;
- */zsh) version_=`versions_shell_zsh ${shell_}` ;;
+ */ksh) version_=`versions_shell_ksh "${shell_}"` ;;
+ */pdksh) version_=`versions_shell_pdksh "${shell_}"` ;;
+ */zsh) version_=`versions_shell_zsh "${shell_}"` ;;
*) version_='invalid'
esac
- echo ${version_:-unknown}
+ echo "${version_:-unknown}"
unset shell_ version_
}
+# The ash shell is included in BusyBox.
+versions_shell_ash() {
+ busybox --help |head -1 |sed 's/BusyBox v\([0-9.]*\) .*/\1/'
+}
+
versions_shell_bash() {
$1 --version 2>&1 |grep 'GNU bash' |sed 's/.*version \([^ ]*\).*/\1/'
}
@@ -151,34 +172,30 @@ versions_shell_dash() {
versions_shell_ksh() {
versions_shell_=$1
+ versions_version_=''
- # try a few different ways to figure out the version
- versions_version_=`${versions_shell_} --version : 2>&1`
- if [ $? -eq 0 ]; then
+ # Try a few different ways to figure out the version.
+ if versions_version_=`${versions_shell_} --version : 2>&1`; then
versions_version_=`echo "${versions_version_}" \
|sed 's/.*\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\).*/\1/'`
- else
- versions_version_=''
fi
-
if [ -z "${versions_version_}" ]; then
_versions_have_strings
- versions_version_=`strings ${versions_shell_} 2>&1 \
+ versions_version_=`strings "${versions_shell_}" 2>&1 \
|grep Version \
|sed 's/^.*Version \(.*\)$/\1/;s/ s+ \$$//;s/ /-/g'`
fi
-
if [ -z "${versions_version_}" ]; then
- versions_version_=`versions_shell_pdksh ${versions_shell_}`
+ versions_version_=`versions_shell_pdksh "${versions_shell_}"`
fi
- echo ${versions_version_}
+ echo "${versions_version_}"
unset versions_shell_ versions_version_
}
versions_shell_pdksh() {
_versions_have_strings
- strings $1 2>&1 \
+ strings "$1" 2>&1 \
|grep 'PD KSH' \
|sed -e 's/.*PD KSH \(.*\)/\1/;s/ /-/g'
}
@@ -186,27 +203,28 @@ versions_shell_pdksh() {
versions_shell_zsh() {
versions_shell_=$1
- # try a few different ways to figure out the version
+ # Try a few different ways to figure out the version.
+ # shellcheck disable=SC2016
versions_version_=`echo 'echo ${ZSH_VERSION}' |${versions_shell_}`
if [ -z "${versions_version_}" ]; then
versions_version_=`${versions_shell_} --version 2>&1 |awk '{print $2}'`
fi
- echo ${versions_version_}
+ echo "${versions_version_}"
unset versions_shell_ versions_version_
}
# Determine if the 'strings' binary installed.
_versions_have_strings() {
[ ${__versions_haveStrings} -ne ${ERROR} ] && return
- eval strings /dev/null >/dev/null 2>&1
- if [ $? -eq 0 ]; then
+ if eval strings /dev/null >/dev/null 2>&1; then
__versions_haveStrings=${TRUE}
- else
- echo 'WARN: strings not installed. try installing binutils?' >&2
- __versions_haveStrings=${FALSE}
+ return
fi
+
+ echo 'WARN: strings not installed. try installing binutils?' >&2
+ __versions_haveStrings=${FALSE}
}
versions_main() {
@@ -218,7 +236,7 @@ versions_main() {
echo "os: ${os_name} version: ${os_version}"
for shell in ${VERSIONS_SHELLS}; do
- shell_version=`versions_shellVersion ${shell}`
+ shell_version=`versions_shellVersion "${shell}"`
echo "shell: ${shell} version: ${shell_version}"
done
}
diff --git a/src/shflags b/shflags
index 0d147b3..1052e00 100644
--- a/src/shflags
+++ b/shflags
@@ -81,12 +81,21 @@
#
# Notes:
# - lists of strings are space separated, and a null value is the '~' char.
+#
+# $() are not fully portable (POSIX != portable).
+# shellcheck disable=SC2006
+# [ p -a q ] are well defined enough (vs [ p ] && [ q ]).
+# shellcheck disable=SC2166
-# return if FLAGS already loaded
+# Return if FLAGS already loaded.
[ -n "${FLAGS_VERSION:-}" ] && return 0
+<<<<<<< HEAD:src/shflags
FLAGS_VERSION='1.2.1'
+=======
+FLAGS_VERSION='1.2.2'
+>>>>>>> 16e8d0d3a58dfe8ccc0423b2cfbdf8119e7a86d7:shflags
-# return values that scripts can use
+# Return values that scripts can use.
FLAGS_TRUE=0
FLAGS_FALSE=1
FLAGS_ERROR=2
@@ -100,17 +109,24 @@ FLAGS_LEVEL_FATAL=4
__FLAGS_LEVEL_DEFAULT=${FLAGS_LEVEL_WARN}
# Determine some reasonable command defaults.
+__FLAGS_EXPR_CMD='expr --'
__FLAGS_UNAME_S=`uname -s`
-case "${__FLAGS_UNAME_S}" in
- BSD) __FLAGS_EXPR_CMD='gexpr' ;;
- *) __FLAGS_EXPR_CMD='expr' ;;
-esac
+if [ "${__FLAGS_UNAME_S}" = 'BSD' ]; then
+ __FLAGS_EXPR_CMD='gexpr --'
+else
+ _flags_output_=`${__FLAGS_EXPR_CMD} 2>&1`
+ if [ $? -eq ${FLAGS_TRUE} -a "${_flags_output_}" = '--' ]; then
+ # We are likely running inside BusyBox.
+ __FLAGS_EXPR_CMD='expr'
+ fi
+ unset _flags_output_
+fi
-# commands a user can override if needed
+# Commands a user can override if needed.
FLAGS_EXPR_CMD=${FLAGS_EXPR_CMD:-${__FLAGS_EXPR_CMD}}
FLAGS_GETOPT_CMD=${FLAGS_GETOPT_CMD:-getopt}
-# specific shell checks
+# Specific shell checks.
if [ -n "${ZSH_VERSION:-}" ]; then
setopt |grep "^shwordsplit$" >/dev/null
if [ $? -ne ${FLAGS_TRUE} ]; then
@@ -122,7 +138,7 @@ if [ -n "${ZSH_VERSION:-}" ]; then
fi
fi
-# can we use built-ins?
+# Can we use built-ins?
( echo "${FLAGS_TRUE#0}"; ) >/dev/null 2>&1
if [ $? -eq ${FLAGS_TRUE} ]; then
__FLAGS_USE_BUILTIN=${FLAGS_TRUE}
@@ -132,21 +148,21 @@ fi
#
-# constants
+# Constants.
#
-# reserved flag names
+# Reserved flag names.
__FLAGS_RESERVED_LIST=' ARGC ARGV ERROR FALSE GETOPT_CMD HELP PARENT TRUE '
__FLAGS_RESERVED_LIST="${__FLAGS_RESERVED_LIST} VERSION "
-# getopt version
+# getopt version.
__FLAGS_GETOPT_VERS_STD=0
__FLAGS_GETOPT_VERS_ENH=1
-__FLAGS_GETOPT_VERS_BSD=2
${FLAGS_GETOPT_CMD} >/dev/null 2>&1
case $? in
0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;; # bsd getopt
+ 1) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_ENH} ;; # BusyBox getopt.
2)
# TODO(kward): look into '-T' option to test the internal getopt() version
if [ "`${FLAGS_GETOPT_CMD} --version`" = '-- ' ]; then
@@ -164,40 +180,40 @@ __FLAGS_OPTSTR_LONG=1
__FLAGS_NULL='~'
-# flag info strings
+# Flag info strings.
__FLAGS_INFO_DEFAULT='default'
__FLAGS_INFO_HELP='help'
__FLAGS_INFO_SHORT='short'
__FLAGS_INFO_TYPE='type'
-# flag lengths
+# Flag lengths.
__FLAGS_LEN_SHORT=0
__FLAGS_LEN_LONG=1
-# flag types
+# Flag types.
__FLAGS_TYPE_NONE=0
__FLAGS_TYPE_BOOLEAN=1
__FLAGS_TYPE_FLOAT=2
__FLAGS_TYPE_INTEGER=3
__FLAGS_TYPE_STRING=4
-# set the constants readonly
+# Set the constants readonly.
__flags_constants=`set |awk -F= '/^FLAGS_/ || /^__FLAGS_/ {print $1}'`
for __flags_const in ${__flags_constants}; do
- # skip certain flags
+ # Skip certain flags.
case ${__flags_const} in
FLAGS_HELP) continue ;;
FLAGS_PARENT) continue ;;
esac
- # set flag readonly
+ # Set flag readonly.
if [ -z "${ZSH_VERSION:-}" ]; then
- readonly ${__flags_const}
- else # handle zsh
- case ${ZSH_VERSION} in
- [123].*) readonly ${__flags_const} ;;
- *) readonly -g ${__flags_const} ;; # declare readonly constants globally
- esac
+ readonly "${__flags_const}"
+ continue
fi
+ case ${ZSH_VERSION} in
+ [123].*) readonly "${__flags_const}" ;;
+ *) readonly -g "${__flags_const}" ;; # Declare readonly constants globally.
+ esac
done
unset __flags_const __flags_constants
@@ -222,23 +238,23 @@ __flags_opts='' # Temporary storage for parsed getopt flags.
# Logging functions.
_flags_debug() {
[ ${__flags_level} -le ${FLAGS_LEVEL_DEBUG} ] || return
- echo "flags:DEBUG $@" >&2
+ echo "flags:DEBUG $*" >&2
}
_flags_info() {
[ ${__flags_level} -le ${FLAGS_LEVEL_INFO} ] || return
- echo "flags:INFO $@" >&2
+ echo "flags:INFO $*" >&2
}
_flags_warn() {
[ ${__flags_level} -le ${FLAGS_LEVEL_WARN} ] || return
- echo "flags:WARN $@" >&2
+ echo "flags:WARN $*" >&2
}
_flags_error() {
[ ${__flags_level} -le ${FLAGS_LEVEL_ERROR} ] || return
- echo "flags:ERROR $@" >&2
+ echo "flags:ERROR $*" >&2
}
_flags_fatal() {
[ ${__flags_level} -le ${FLAGS_LEVEL_FATAL} ] || return
- echo "flags:FATAL $@" >&2
+ echo "flags:FATAL $*" >&2
exit ${FLAGS_ERROR}
}
@@ -254,8 +270,8 @@ flags_loggingLevel() { echo ${__flags_level}; }
flags_setLoggingLevel() {
[ $# -ne 1 ] && _flags_fatal "flags_setLevel(): logging level missing"
_flags_level_=$1
- [ ${_flags_level_} -ge ${FLAGS_LEVEL_DEBUG} \
- -a ${_flags_level_} -le ${FLAGS_LEVEL_FATAL} ] \
+ [ "${_flags_level_}" -ge "${FLAGS_LEVEL_DEBUG}" \
+ -a "${_flags_level_}" -le "${FLAGS_LEVEL_FATAL}" ] \
|| _flags_fatal "Invalid logging level '${_flags_level_}' specified."
__flags_level=$1
unset _flags_level_
@@ -279,8 +295,7 @@ flags_setLoggingLevel() {
# _flags_short_: string: (optional) short flag name
# Returns:
# integer: success of operation, or error
-_flags_define()
-{
+_flags_define() {
if [ $# -lt 4 ]; then
flags_error='DEFINE error: too few arguments'
flags_return=${FLAGS_ERROR}
@@ -291,7 +306,7 @@ _flags_define()
_flags_type_=$1
_flags_name_=$2
_flags_default_=$3
- _flags_help_=$4
+ _flags_help_=${4:-§} # Special value '§' indicates no help string provided.
_flags_short_=${5:-${__FLAGS_NULL}}
_flags_debug "type:${_flags_type_} name:${_flags_name_}" \
@@ -299,10 +314,10 @@ _flags_define()
"short:${_flags_short_}"
_flags_return_=${FLAGS_TRUE}
- _flags_usName_=`_flags_underscoreName ${_flags_name_}`
+ _flags_usName_="`_flags_underscoreName "${_flags_name_}"`"
# check whether the flag name is reserved
- _flags_itemInList ${_flags_usName_} "${__FLAGS_RESERVED_LIST}"
+ _flags_itemInList "${_flags_usName_}" "${__FLAGS_RESERVED_LIST}"
if [ $? -eq ${FLAGS_TRUE} ]; then
flags_error="flag name (${_flags_name_}) is reserved"
_flags_return_=${FLAGS_ERROR}
@@ -319,7 +334,7 @@ _flags_define()
# check for existing long name definition
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
- if _flags_itemInList ${_flags_usName_} ${__flags_definedNames}; then
+ if _flags_itemInList "${_flags_usName_}" "${__flags_definedNames}"; then
flags_error="definition for ([no]${_flags_name_}) already exists"
_flags_warn "${flags_error}"
_flags_return_=${FLAGS_FALSE}
@@ -330,7 +345,7 @@ _flags_define()
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
-a "${_flags_short_}" != "${__FLAGS_NULL}" ]
then
- if _flags_itemInList "${_flags_short_}" ${__flags_shortNames}; then
+ if _flags_itemInList "${_flags_short_}" "${__flags_shortNames}"; then
flags_error="flag short name (${_flags_short_}) already defined"
_flags_warn "${flags_error}"
_flags_return_=${FLAGS_FALSE}
@@ -393,12 +408,12 @@ _flags_define()
# append flag names to name lists
__flags_shortNames="${__flags_shortNames}${_flags_short_} "
__flags_longNames="${__flags_longNames}${_flags_name_} "
- [ ${_flags_type_} -eq ${__FLAGS_TYPE_BOOLEAN} ] && \
+ [ "${_flags_type_}" -eq "${__FLAGS_TYPE_BOOLEAN}" ] && \
__flags_boolNames="${__flags_boolNames}no${_flags_name_} "
# append flag names to defined names for later validation checks
__flags_definedNames="${__flags_definedNames}${_flags_usName_} "
- [ ${_flags_type_} -eq ${__FLAGS_TYPE_BOOLEAN} ] && \
+ [ "${_flags_type_}" -eq "${__FLAGS_TYPE_BOOLEAN}" ] && \
__flags_definedNames="${__flags_definedNames}no${_flags_usName_} "
fi
@@ -415,9 +430,8 @@ _flags_define()
# unnamed: string: log flag name
# Output:
# string: underscored name
-_flags_underscoreName()
-{
- echo $1 |tr '-' '_'
+_flags_underscoreName() {
+ echo "$1" |tr '-' '_'
}
# Return valid getopt options using currently defined list of long options.
@@ -431,24 +445,23 @@ _flags_underscoreName()
# string: generated option string for getopt
# Returns:
# boolean: success of operation (always returns True)
-_flags_genOptStr()
-{
+_flags_genOptStr() {
_flags_optStrType_=$1
_flags_opts_=''
for _flags_name_ in ${__flags_longNames}; do
- _flags_usName_=`_flags_underscoreName ${_flags_name_}`
- _flags_type_=`_flags_getFlagInfo ${_flags_usName_} ${__FLAGS_INFO_TYPE}`
+ _flags_usName_="`_flags_underscoreName "${_flags_name_}"`"
+ _flags_type_="`_flags_getFlagInfo "${_flags_usName_}" "${__FLAGS_INFO_TYPE}"`"
[ $? -eq ${FLAGS_TRUE} ] || _flags_fatal 'call to _flags_type_ failed'
case ${_flags_optStrType_} in
${__FLAGS_OPTSTR_SHORT})
- _flags_shortName_=`_flags_getFlagInfo \
- ${_flags_usName_} ${__FLAGS_INFO_SHORT}`
+ _flags_shortName_="`_flags_getFlagInfo \
+ "${_flags_usName_}" "${__FLAGS_INFO_SHORT}"`"
if [ "${_flags_shortName_}" != "${__FLAGS_NULL}" ]; then
_flags_opts_="${_flags_opts_}${_flags_shortName_}"
# getopt needs a trailing ':' to indicate a required argument
- [ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
+ [ "${_flags_type_}" -ne "${__FLAGS_TYPE_BOOLEAN}" ] && \
_flags_opts_="${_flags_opts_}:"
fi
;;
@@ -456,7 +469,7 @@ _flags_genOptStr()
${__FLAGS_OPTSTR_LONG})
_flags_opts_="${_flags_opts_:+${_flags_opts_},}${_flags_name_}"
# getopt needs a trailing ':' to indicate a required argument
- [ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
+ [ "${_flags_type_}" -ne "${__FLAGS_TYPE_BOOLEAN}" ] && \
_flags_opts_="${_flags_opts_}:"
;;
esac
@@ -477,30 +490,39 @@ _flags_genOptStr()
# string: value of dereferenced flag variable
# Returns:
# integer: one of FLAGS_{TRUE|FALSE|ERROR}
-_flags_getFlagInfo()
-{
- # note: adding gFI to variable names to prevent naming conflicts with calling
+_flags_getFlagInfo() {
+ # Note: adding gFI to variable names to prevent naming conflicts with calling
# functions
_flags_gFI_usName_=$1
_flags_gFI_info_=$2
+ # Example: given argument usName (underscored flag name) of 'my_flag', and
+ # argument info of 'help', set the _flags_infoValue_ variable to the value of
+ # ${__flags_my_flag_help}, and see if it is non-empty.
_flags_infoVar_="__flags_${_flags_gFI_usName_}_${_flags_gFI_info_}"
_flags_strToEval_="_flags_infoValue_=\"\${${_flags_infoVar_}:-}\""
eval "${_flags_strToEval_}"
- if [ -n "${_flags_infoValue_+x}" ]; then
+ if [ -n "${_flags_infoValue_}" ]; then
+ # Special value '§' indicates no help string provided.
+ [ "${_flags_gFI_info_}" = ${__FLAGS_INFO_HELP} \
+ -a "${_flags_infoValue_}" = '§' ] && _flags_infoValue_=''
flags_return=${FLAGS_TRUE}
else
- # see if the _flags_gFI_usName_ variable is a string as strings can be
+ # See if the _flags_gFI_usName_ variable is a string as strings can be
# empty...
- # note: the DRY principle would say to have this function call itself for
+ # Note: the DRY principle would say to have this function call itself for
# the next three lines, but doing so results in an infinite loop as an
# invalid _flags_name_ will also not have the associated _type variable.
# Because it doesn't (it will evaluate to an empty string) the logic will
# try to find the _type variable of the _type variable, and so on. Not so
# good ;-)
+ #
+ # Example cont.: set the _flags_typeValue_ variable to the value of
+ # ${__flags_my_flag_type}, and see if it equals '4'.
_flags_typeVar_="__flags_${_flags_gFI_usName_}_${__FLAGS_INFO_TYPE}"
_flags_strToEval_="_flags_typeValue_=\"\${${_flags_typeVar_}:-}\""
eval "${_flags_strToEval_}"
+ # shellcheck disable=SC2154
if [ "${_flags_typeValue_}" = "${__FLAGS_TYPE_STRING}" ]; then
flags_return=${FLAGS_TRUE}
else
@@ -543,22 +565,23 @@ _flags_itemInList() {
#
# Output:
# integer: width in columns of the current screen.
-_flags_columns()
-{
+_flags_columns() {
if [ -z "${__flags_columns}" ]; then
- # determine the value and store it
if eval stty size >/dev/null 2>&1; then
# stty size worked :-)
+ # shellcheck disable=SC2046
set -- `stty size`
- __flags_columns=$2
- elif eval tput cols >/dev/null 2>&1; then
+ __flags_columns="${2:-}"
+ fi
+ fi
+ if [ -z "${__flags_columns}" ]; then
+ if eval tput cols >/dev/null 2>&1; then
+ # shellcheck disable=SC2046
set -- `tput cols`
- __flags_columns=$1
- else
- __flags_columns=80 # default terminal width
+ __flags_columns="${1:-}"
fi
fi
- echo ${__flags_columns}
+ echo "${__flags_columns:-80}"
}
# Validate a boolean.
@@ -567,8 +590,7 @@ _flags_columns()
# _flags__bool: boolean: value to validate
# Returns:
# bool: true if the value is a valid boolean
-_flags_validBool()
-{
+_flags_validBool() {
_flags_bool_=$1
flags_return=${FLAGS_TRUE}
@@ -588,19 +610,18 @@ _flags_validBool()
# _flags_float_: float: value to validate
# Returns:
# bool: true if the value is a valid integer
-_flags_validFloat()
-{
+_flags_validFloat() {
flags_return=${FLAGS_FALSE}
[ -n "$1" ] || return ${flags_return}
_flags_float_=$1
- if _flags_validInt ${_flags_float_}; then
+ if _flags_validInt "${_flags_float_}"; then
flags_return=${FLAGS_TRUE}
elif _flags_useBuiltin; then
_flags_float_whole_=${_flags_float_%.*}
_flags_float_fraction_=${_flags_float_#*.}
- if _flags_validInt ${_flags_float_whole_:-0} -a \
- _flags_validInt ${_flags_float_fraction_}; then
+ if _flags_validInt "${_flags_float_whole_:-0}" -a \
+ _flags_validInt "${_flags_float_fraction_}"; then
flags_return=${FLAGS_TRUE}
fi
unset _flags_float_whole_ _flags_float_fraction_
@@ -608,11 +629,11 @@ _flags_validFloat()
flags_return=${FLAGS_TRUE}
case ${_flags_float_} in
-*) # negative floats
- _flags_test_=`${FLAGS_EXPR_CMD} -- "${_flags_float_}" :\
+ _flags_test_=`${FLAGS_EXPR_CMD} "${_flags_float_}" :\
'\(-[0-9]*\.[0-9]*\)'`
;;
*) # positive floats
- _flags_test_=`${FLAGS_EXPR_CMD} -- "${_flags_float_}" :\
+ _flags_test_=`${FLAGS_EXPR_CMD} "${_flags_float_}" :\
'\([0-9]*\.[0-9]*\)'`
;;
esac
@@ -630,8 +651,7 @@ _flags_validFloat()
# _flags_int_: integer: value to validate
# Returns:
# bool: true if the value is a valid integer
-_flags_validInt()
-{
+_flags_validInt() {
flags_return=${FLAGS_FALSE}
[ -n "$1" ] || return ${flags_return}
_flags_int_=$1
@@ -642,7 +662,7 @@ _flags_validInt()
if _flags_useBuiltin; then
_flags_int_=${_flags_int_#-}
else
- _flags_int_=`${FLAGS_EXPR_CMD} -- "${_flags_int_}" : '-\([0-9][0-9]*\)'`
+ _flags_int_=`${FLAGS_EXPR_CMD} "${_flags_int_}" : '-\([0-9][0-9]*\)'`
fi
;;
esac
@@ -665,8 +685,7 @@ _flags_validInt()
# @: varies: command-line options to parse
# Returns:
# integer: a FLAGS success condition
-_flags_getoptStandard()
-{
+_flags_getoptStandard() {
flags_return=${FLAGS_TRUE}
_flags_shortOpts_=`_flags_genOptStr ${__FLAGS_OPTSTR_SHORT}`
@@ -682,7 +701,7 @@ _flags_getoptStandard()
done
if [ ${flags_return} -eq ${FLAGS_TRUE} ]; then
- __flags_opts=`getopt ${_flags_shortOpts_} $@ 2>&1`
+ __flags_opts=`getopt "${_flags_shortOpts_}" "$@" 2>&1`
_flags_rtrn_=$?
if [ ${_flags_rtrn_} -ne ${FLAGS_TRUE} ]; then
_flags_warn "${__flags_opts}"
@@ -704,8 +723,7 @@ _flags_getoptStandard()
# @: varies: command-line options to parse
# Returns:
# integer: a FLAGS success condition
-_flags_getoptEnhanced()
-{
+_flags_getoptEnhanced() {
flags_return=${FLAGS_TRUE}
_flags_shortOpts_=`_flags_genOptStr ${__FLAGS_OPTSTR_SHORT}`
_flags_boolOpts_=`echo "${__flags_boolNames}" \
@@ -713,7 +731,7 @@ _flags_getoptEnhanced()
_flags_longOpts_=`_flags_genOptStr ${__FLAGS_OPTSTR_LONG}`
__flags_opts=`${FLAGS_GETOPT_CMD} \
- -o ${_flags_shortOpts_} \
+ -o "${_flags_shortOpts_}" \
-l "${_flags_longOpts_},${_flags_boolOpts_}" \
-- "$@" 2>&1`
_flags_rtrn_=$?
@@ -738,14 +756,15 @@ _flags_getoptEnhanced()
# @: varies: output from getopt parsing
# Returns:
# integer: a FLAGS success condition
-_flags_parseGetopt()
-{
+_flags_parseGetopt() {
_flags_argc_=$1
shift
flags_return=${FLAGS_TRUE}
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
+ # The @$ must be unquoted as it needs to be re-split.
+ # shellcheck disable=SC2068
set -- $@
else
# note the quotes around the `$@' -- they are essential!
@@ -758,6 +777,7 @@ _flags_parseGetopt()
# arguments. Its usage was replaced by FLAGS_ARGV, and it is being kept only
# for backwards compatibility reasons.
FLAGS_ARGC=`_flags_math "$# - 1 - ${_flags_argc_}"`
+ export FLAGS_ARGC
# handle options. note options with values must do an additional shift
while true; do
@@ -774,18 +794,18 @@ _flags_parseGetopt()
if _flags_useBuiltin; then
_flags_opt_=${_flags_opt_#*--}
else
- _flags_opt_=`${FLAGS_EXPR_CMD} -- "${_flags_opt_}" : '--\(.*\)'`
+ _flags_opt_=`${FLAGS_EXPR_CMD} "${_flags_opt_}" : '--\(.*\)'`
fi
_flags_len_=${__FLAGS_LEN_LONG}
- if _flags_itemInList "${_flags_opt_}" ${__flags_longNames}; then
+ if _flags_itemInList "${_flags_opt_}" "${__flags_longNames}"; then
_flags_name_=${_flags_opt_}
else
- # check for negated long boolean version
- if _flags_itemInList "${_flags_opt_}" ${__flags_boolNames}; then
+ # Check for negated long boolean version.
+ if _flags_itemInList "${_flags_opt_}" "${__flags_boolNames}"; then
if _flags_useBuiltin; then
_flags_name_=${_flags_opt_#*no}
else
- _flags_name_=`${FLAGS_EXPR_CMD} -- "${_flags_opt_}" : 'no\(.*\)'`
+ _flags_name_=`${FLAGS_EXPR_CMD} "${_flags_opt_}" : 'no\(.*\)'`
fi
_flags_type_=${__FLAGS_TYPE_BOOLEAN}
_flags_arg_=${__FLAGS_NULL}
@@ -793,34 +813,34 @@ _flags_parseGetopt()
fi
;;
- -*) # short option
+ -*) # Short option.
if _flags_useBuiltin; then
_flags_opt_=${_flags_opt_#*-}
else
- _flags_opt_=`${FLAGS_EXPR_CMD} -- "${_flags_opt_}" : '-\(.*\)'`
+ _flags_opt_=`${FLAGS_EXPR_CMD} "${_flags_opt_}" : '-\(.*\)'`
fi
_flags_len_=${__FLAGS_LEN_SHORT}
- if _flags_itemInList "${_flags_opt_}" ${__flags_shortNames}; then
- # yes. match short name to long name. note purposeful off-by-one
+ if _flags_itemInList "${_flags_opt_}" "${__flags_shortNames}"; then
+ # Yes. Match short name to long name. Note purposeful off-by-one
# (too high) with awk calculations.
_flags_pos_=`echo "${__flags_shortNames}" \
|awk 'BEGIN{RS=" ";rn=0}$0==e{rn=NR}END{print rn}' \
- e=${_flags_opt_}`
+ e="${_flags_opt_}"`
_flags_name_=`echo "${__flags_longNames}" \
|awk 'BEGIN{RS=" "}rn==NR{print $0}' rn="${_flags_pos_}"`
fi
;;
esac
- # die if the flag was unrecognized
+ # Die if the flag was unrecognized.
if [ -z "${_flags_name_}" ]; then
flags_error="unrecognized option (${_flags_opt_})"
flags_return=${FLAGS_ERROR}
break
fi
- # set new flag value
- _flags_usName_=`_flags_underscoreName ${_flags_name_}`
+ # Set new flag value.
+ _flags_usName_=`_flags_underscoreName "${_flags_name_}"`
[ ${_flags_type_} -eq ${__FLAGS_TYPE_NONE} ] && \
_flags_type_=`_flags_getFlagInfo \
"${_flags_usName_}" ${__FLAGS_INFO_TYPE}`
@@ -836,7 +856,8 @@ _flags_parseGetopt()
_flags_strToEval_="_flags_val_=\
\${__flags_${_flags_usName_}_${__FLAGS_INFO_DEFAULT}}"
eval "${_flags_strToEval_}"
- if [ ${_flags_val_} -eq ${FLAGS_FALSE} ]; then
+ # shellcheck disable=SC2154
+ if [ "${_flags_val_}" -eq ${FLAGS_FALSE} ]; then
eval "FLAGS_${_flags_usName_}=${FLAGS_TRUE}"
else
eval "FLAGS_${_flags_usName_}=${FLAGS_FALSE}"
@@ -869,9 +890,10 @@ _flags_parseGetopt()
;;
esac
- # handle special case help flag
+ # Handle special case help flag.
if [ "${_flags_usName_}" = 'help' ]; then
- if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then
+ # shellcheck disable=SC2154
+ if [ "${FLAGS_help}" -eq ${FLAGS_TRUE} ]; then
flags_help
flags_error='help requested'
flags_return=${FLAGS_FALSE}
@@ -879,12 +901,12 @@ _flags_parseGetopt()
fi
fi
- # shift the option and non-boolean arguments out.
+ # Shift the option and non-boolean arguments out.
shift
- [ ${_flags_type_} != ${__FLAGS_TYPE_BOOLEAN} ] && shift
+ [ "${_flags_type_}" != ${__FLAGS_TYPE_BOOLEAN} ] && shift
done
- # give user back non-flag arguments
+ # Give user back non-flag arguments.
FLAGS_ARGV=''
while [ $# -gt 0 ]; do
FLAGS_ARGV="${FLAGS_ARGV:+${FLAGS_ARGV} }'$1'"
@@ -904,19 +926,19 @@ _flags_parseGetopt()
# integer: the result
# Returns:
# bool: success of math evaluation
-_flags_math()
-{
+_flags_math() {
if [ $# -eq 0 ]; then
flags_return=${FLAGS_FALSE}
elif _flags_useBuiltin; then
# Variable assignment is needed as workaround for Solaris Bourne shell,
# which cannot parse a bare $((expression)).
+ # shellcheck disable=SC2016
_flags_expr_='$(($@))'
eval echo ${_flags_expr_}
flags_return=$?
unset _flags_expr_
else
- eval expr $@
+ eval expr "$@"
flags_return=$?
fi
@@ -931,8 +953,7 @@ _flags_math()
# integer: length of string
# Returns:
# bool: success of strlen evaluation
-_flags_strlen()
-{
+_flags_strlen() {
_flags_str_=${1:-}
if [ -z "${_flags_str_}" ]; then
@@ -940,12 +961,12 @@ _flags_strlen()
elif _flags_useBuiltin; then
flags_output=${#_flags_str_}
else
- flags_output=`${FLAGS_EXPR_CMD} -- "${_flags_str_}" : '.*'`
+ flags_output=`${FLAGS_EXPR_CMD} "${_flags_str_}" : '.*'`
fi
flags_return=$?
unset _flags_str_
- echo ${flags_output}
+ echo "${flags_output}"
return ${flags_return}
}
@@ -986,13 +1007,12 @@ DEFINE_string() { _flags_define ${__FLAGS_TYPE_STRING} "$@"; }
# unnamed: list: command-line flags to parse
# Returns:
# integer: success of operation, or error
-FLAGS()
-{
- # define a standard 'help' flag if one isn't already defined
+FLAGS() {
+ # Define a standard 'help' flag if one isn't already defined.
[ -z "${__flags_help_type:-}" ] && \
DEFINE_boolean 'help' false 'show this help' 'h'
- # parse options
+ # Parse options.
if [ $# -gt 0 ]; then
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
_flags_getoptStandard "$@"
@@ -1001,7 +1021,7 @@ FLAGS()
fi
flags_return=$?
else
- # nothing passed; won't bother running getopt
+ # Nothing passed; won't bother running getopt.
__flags_opts='--'
flags_return=${FLAGS_TRUE}
fi
@@ -1025,8 +1045,7 @@ FLAGS()
# debug info that can be included in a bug report
# Returns:
# nothing
-flags_getoptInfo()
-{
+flags_getoptInfo() {
# platform info
_flags_debug "uname -a: `uname -a`"
_flags_debug "PATH: ${PATH}"
@@ -1057,8 +1076,7 @@ flags_getoptInfo()
# none
# Returns:
# bool: true if getopt is the enhanced version
-flags_getoptIsEnh()
-{
+flags_getoptIsEnh() {
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_ENH}
}
@@ -1068,8 +1086,7 @@ flags_getoptIsEnh()
# none
# Returns:
# bool: true if getopt is the standard version
-flags_getoptIsStd()
-{
+flags_getoptIsStd() {
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD}
}
@@ -1082,8 +1099,7 @@ flags_getoptIsStd()
# none
# Returns:
# integer: success of operation (always returns true)
-flags_help()
-{
+flags_help() {
if [ -n "${FLAGS_HELP:-}" ]; then
echo "${FLAGS_HELP}" >&2
else
@@ -1094,7 +1110,7 @@ flags_help()
for flags_name_ in ${__flags_longNames}; do
flags_flagStr_=''
flags_boolStr_=''
- flags_usName_=`_flags_underscoreName ${flags_name_}`
+ flags_usName_=`_flags_underscoreName "${flags_name_}"`
flags_default_=`_flags_getFlagInfo \
"${flags_usName_}" ${__FLAGS_INFO_DEFAULT}`
@@ -1112,7 +1128,7 @@ flags_help()
[ "${flags_short_}" != "${__FLAGS_NULL}" ] && \
flags_flagStr_="${flags_flagStr_},"
# add [no] to long boolean flag names, except the 'help' flag
- [ ${flags_type_} -eq ${__FLAGS_TYPE_BOOLEAN} \
+ [ "${flags_type_}" -eq ${__FLAGS_TYPE_BOOLEAN} \
-a "${flags_usName_}" != 'help' ] && \
flags_boolStr_='[no]'
flags_flagStr_="${flags_flagStr_}--${flags_boolStr_}${flags_name_}:"
@@ -1120,7 +1136,7 @@ flags_help()
case ${flags_type_} in
${__FLAGS_TYPE_BOOLEAN})
- if [ ${flags_default_} -eq ${FLAGS_TRUE} ]; then
+ if [ "${flags_default_}" -eq ${FLAGS_TRUE} ]; then
flags_defaultStr_='true'
else
flags_defaultStr_='false'
@@ -1132,12 +1148,12 @@ flags_help()
esac
flags_defaultStr_="(default: ${flags_defaultStr_})"
- flags_helpStr_=" ${flags_flagStr_} ${flags_help_} ${flags_defaultStr_}"
+ flags_helpStr_=" ${flags_flagStr_} ${flags_help_:+${flags_help_} }${flags_defaultStr_}"
_flags_strlen "${flags_helpStr_}" >/dev/null
flags_helpStrLen_=${flags_output}
flags_columns_=`_flags_columns`
- if [ ${flags_helpStrLen_} -lt ${flags_columns_} ]; then
+ if [ "${flags_helpStrLen_}" -lt "${flags_columns_}" ]; then
echo "${flags_helpStr_}" >&2
else
echo " ${flags_flagStr_} ${flags_help_}" >&2
@@ -1150,7 +1166,7 @@ flags_help()
flags_helpStrLen_=${flags_output}
if [ ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD} \
- -o ${flags_helpStrLen_} -lt ${flags_columns_} ]; then
+ -o "${flags_helpStrLen_}" -lt "${flags_columns_}" ]; then
# indented to match help string
echo "${flags_helpStr_}" >&2
else
@@ -1174,10 +1190,9 @@ flags_help()
# none
# Returns:
# nothing
-flags_reset()
-{
+flags_reset() {
for flags_name_ in ${__flags_longNames}; do
- flags_usName_=`_flags_underscoreName ${flags_name_}`
+ flags_usName_=`_flags_underscoreName "${flags_name_}"`
flags_strToEval_="unset FLAGS_${flags_usName_}"
for flags_type_ in \
${__FLAGS_INFO_DEFAULT} \
@@ -1188,7 +1203,7 @@ flags_reset()
flags_strToEval_=\
"${flags_strToEval_} __flags_${flags_usName_}_${flags_type_}"
done
- eval ${flags_strToEval_}
+ eval "${flags_strToEval_}"
done
# Reset internal variables.
diff --git a/src/shflags_test_defines.sh b/shflags_defines_test.sh
index 91baf8b..e4582b5 100755
--- a/src/shflags_test_defines.sh
+++ b/shflags_defines_test.sh
@@ -2,39 +2,48 @@
# vim:et:ft=sh:sts=2:sw=2
#
# shFlags unit test for the flag definition methods
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shflags
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
-# load test helpers
-. ./shflags_test_helpers
+# These variables will be overridden by the test helpers.
+stdoutF="${TMPDIR:-/tmp}/STDOUT"
+stderrF="${TMPDIR:-/tmp}/STDERR"
-#------------------------------------------------------------------------------
-# suite tests
-#
+# Load test helpers.
+. ./shflags_test_helpers
-testFlagsDefine()
-{
- # no arguments
+testFlagsDefine() {
+ # No arguments.
_flags_define >"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() with no arguments should have failed.' $?
assertErrorMsg '' 'no arguments'
- # one argument
+ # One argument.
_flags_define arg1 >"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() call with one argument should fail' $?
assertErrorMsg '' 'one argument'
- # two arguments
+ # Two arguments.
_flags_define arg1 arg2 >"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() call with two arguments should fail' $?
assertErrorMsg '' 'two arguments'
- # three arguments
+ # Three arguments.
_flags_define arg1 arg2 arg3 >"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() call with three arguments should fail' $?
assertErrorMsg '' 'three arguments'
- # multiple definition -- assumes working boolean definition (tested elsewhere)
- _flags_define ${__FLAGS_TYPE_BOOLEAN} multiDefBool true 'multi def #1' m
- _flags_define ${__FLAGS_TYPE_BOOLEAN} multiDefBool false 'multi def #2' m \
+ # Multiple definition. Assumes working boolean definition (tested elsewhere).
+ _flags_define "${__FLAGS_TYPE_BOOLEAN}" multiDefBool true 'multi def #1' m
+ _flags_define "${__FLAGS_TYPE_BOOLEAN}" multiDefBool false 'multi def #2' m \
>"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() with existing flag name should fail' $?
assertTrue \
@@ -42,27 +51,27 @@ testFlagsDefine()
"${FLAGS_multiDefBool:-}"
assertWarnMsg '' 'existing flag'
- # duplicate dashed and underscored definition
- _flags_define ${__FLAGS_TYPE_STRING} long-name 'foo' 'dashed name' l
- _flags_define ${__FLAGS_TYPE_STRING} long_name 'bar' 'underscored name' l \
+ # Duplicate dashed and underscored definition.
+ _flags_define "${__FLAGS_TYPE_STRING}" long-name 'foo' 'dashed name' l
+ _flags_define "${__FLAGS_TYPE_STRING}" long_name 'bar' 'underscored name' l \
>"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() with existing flag name should fail' $?
+ # shellcheck disable=SC2154
assertEquals \
'_flags_define() should not overwrite previously defined default.' \
"${FLAGS_long_name}" 'foo'
assertWarnMsg '' 'already exists'
- # TODO(kward): test requirement of enhanced getopt
+ # TODO(kward): test requirement of enhanced getopt.
- # invalid type
+ # Invalid type.
_flags_define invalid arg2 arg3 arg4 i >"${stdoutF}" 2>"${stderrF}"
assertFalse '_flags_define() with "invalid" type should have failed.' $?
assertErrorMsg 'unrecognized flag type' 'invalid type'
}
-testBoolean()
-{
- # test true defaults
+testBoolean() {
+ # Test true defaults.
for default in 'true' 't' 0; do
flags_reset
DEFINE_boolean boolVal "${default}" 'my boolean' b
@@ -88,28 +97,27 @@ testBoolean()
${rtrn}
done
- # test invalid default
+ # Test invalid default.
flags_reset
DEFINE_boolean boolVal 'invalid' 'my boolean' b >"${stdoutF}" 2>"${stderrF}"
assertFalse 'DEFINE_boolean() call with invalid default did not fail.' $?
assertErrorMsg
}
-testFloat()
-{
- # test valid defaults
+testFloat() {
+ # Test valid defaults.
for default in ${TH_FLOAT_VALID}; do
flags_reset
- DEFINE_float floatVal ${default} "float: ${default}" f
+ DEFINE_float floatVal "${default}" "float: ${default}" f
rtrn=$?
assertSame "DEFINE_float() call with valid default failed." \
- ${default} "${FLAGS_floatVal:-}"
+ "${default}" "${FLAGS_floatVal:-}"
assertTrue \
"DEFINE_float() call with valid default of '${default}' returned failure." \
${rtrn}
done
- # test invalid defaults
+ # Test invalid defaults.
flags_reset
DEFINE_float floatVal 'invalid' 'invalid float: string' f \
>"${stdoutF}" 2>"${stderrF}"
@@ -117,22 +125,21 @@ testFloat()
assertErrorMsg
}
-testInteger()
-{
- # test valid defaults
+testInteger() {
+ # Test valid defaults.
for default in ${TH_INT_VALID}; do
flags_reset
- DEFINE_integer intVal ${default} "integer: ${default}" i
+ DEFINE_integer intVal "${default}" "integer: ${default}" i
rtrn=$?
assertSame \
"DEFINE_integer() call with valid default failed." \
- ${default} "${FLAGS_intVal:-}"
+ "${default}" "${FLAGS_intVal:-}"
assertTrue \
"DEFINE_integer() call with valid default of '${default}' returned failure." \
${rtrn}
done
- # test invalid defaults
+ # Test invalid defaults.
flags_reset
DEFINE_integer intVal 1.234 'invalid integer: float' i \
>"${stdoutF}" 2>"${stderrF}"
@@ -183,35 +190,28 @@ testString()
'' "${FLAGS_str:-}"
}
-testShortNameLength()
-{
- # make sure short names are no longer than a single character
+testShortNameLength() {
+ # Make sure short names are no longer than a single character.
:
}
-testFlagNameIsReserved()
-{
+testFlagNameIsReserved() {
( DEFINE_string TRUE '' 'true is a reserved flag name' t \
>"${stdoutF}" 2>"${stderrF}" )
rtrn=$?
- assertEquals ${FLAGS_ERROR} ${rtrn}
+ assertEquals "${FLAGS_ERROR}" "${rtrn}"
assertErrorMsg 'flag name (TRUE) is reserved'
}
-#------------------------------------------------------------------------------
-# suite functions
-#
-
-oneTimeSetUp()
-{
+oneTimeSetUp() {
th_oneTimeSetUp
}
-tearDown()
-{
+tearDown() {
flags_reset
}
-# load and run shUnit2
+# Load and run shUnit2.
+# shellcheck disable=SC2034
[ -n "${ZSH_VERSION:-}" ] && SHUNIT_PARENT=$0
-. ${TH_SHUNIT}
+. "${TH_SHUNIT}"
diff --git a/src/shflags_test_issue_28.sh b/shflags_issue_28_test.sh
index 37c215e..fbb17d9 100755
--- a/src/shflags_test_issue_28.sh
+++ b/shflags_issue_28_test.sh
@@ -2,14 +2,26 @@
# vim:et:ft=sh:sts=2:sw=2
#
# shFlags unit test for https://github.com/kward/shflags/issues/28.
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shflags
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
+
+# These variables will be overridden by the test helpers.
+expectedF="${TMPDIR:-/tmp}/expected"
+returnF="${TMPDIR:-/tmp}/return"
+stdoutF="${TMPDIR:-/tmp}/STDOUT"
+stderrF="${TMPDIR:-/tmp}/STDERR"
# Load test helpers.
. ./shflags_test_helpers
-#------------------------------------------------------------------------------
-# Suite tests.
-#
-
testHelp() {
_testHelp '-h'
flags_getoptIsEnh || return
@@ -19,42 +31,41 @@ testHelp() {
_testHelp() {
flag=$1
- # test default help output
+ # Test default help output.
th_clearReturn
(
- FLAGS ${flag} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" >"${stdoutF}" 2>"${stderrF}"
echo $? >"${returnF}"
)
- th_queryReturn
- assertTrue \
- 'short help request should have returned a true exit code.' \
- ${th_return}
+ assertFalse \
+ 'short help request should have returned a false exit code.' \
+ "$(th_queryReturn)"
grep 'show this help' "${stderrF}" >/dev/null
grepped=$?
assertTrue \
'short request for help should have produced some help output.' \
${grepped}
- [ ${grepped} -ne ${FLAGS_TRUE} ] && th_showOutput
+ [ ${grepped} -ne "${FLAGS_TRUE}" ] && th_showOutput
- # test proper output when FLAGS_HELP set
+ # Test proper output when FLAGS_HELP set.
(
FLAGS_HELP='this is a test'
- FLAGS ${flag} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" >"${stdoutF}" 2>"${stderrF}"
)
grep 'this is a test' "${stderrF}" >/dev/null
grepped=$?
assertTrue 'setting FLAGS_HELP did not produce expected result' ${grepped}
- [ ${grepped} -ne ${FLAGS_TRUE} ] && th_showOutput
+ [ ${grepped} -ne "${FLAGS_TRUE}" ] && th_showOutput
# test that "'" chars work in help string
(
DEFINE_boolean b false "help string containing a ' char" b
- FLAGS ${flag} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" >"${stdoutF}" 2>"${stderrF}"
)
grep "help string containing a ' char" "${stderrF}" >/dev/null
grepped=$?
assertTrue "help strings containing apostrophes don't work" ${grepped}
- [ ${grepped} -ne ${FLAGS_TRUE} ] && th_showOutput
+ [ ${grepped} -ne "${FLAGS_TRUE}" ] && th_showOutput
}
mock_flags_columns() {
@@ -74,7 +85,7 @@ testStandardHelpOutput() {
cat >"${expectedF}" <<EOF
${help}
flags:
- -f (default: false)
+ -f (default: false)
-h show this help (default: false)
EOF
(
@@ -82,9 +93,6 @@ EOF
FLAGS_HELP=${help};
FLAGS -h >"${stdoutF}" 2>"${stderrF}"
)
- r3turn=$?
- assertTrue 'a call for help should not return an error' ${r3turn}
-
diff "${expectedF}" "${stderrF}" >/dev/null
r3turn=$?
assertTrue 'unexpected help output' ${r3turn}
@@ -100,27 +108,21 @@ testEnhancedHelpOutput() {
cat >"${expectedF}" <<EOF
${help}
flags:
- -f,--[no]force: (default: false)
+ -f,--[no]force: (default: false)
-h,--help: show this help (default: false)
EOF
(
_flags_columns() { mock_flags_columns; }
+ # shellcheck disable=SC2034
FLAGS_HELP=${help};
FLAGS -h >"${stdoutF}" 2>"${stderrF}"
)
- r3turn=$?
- assertTrue 'a call for help should not return an error' ${r3turn}
-
diff "${expectedF}" "${stderrF}" >/dev/null
differed=$?
assertTrue 'unexpected help output' ${differed}
th_showOutput ${differed} "${stdoutF}" "${stderrF}"
}
-#------------------------------------------------------------------------------
-# Suite functions.
-#
-
oneTimeSetUp() {
th_oneTimeSetUp
@@ -136,5 +138,6 @@ setUp() {
}
# Load and run shUnit2.
+# shellcheck disable=SC2034
[ -n "${ZSH_VERSION:-}" ] && SHUNIT_PARENT=$0
-. ${TH_SHUNIT}
+. "${TH_SHUNIT}"
diff --git a/src/shflags_test_parsing.sh b/shflags_parsing_test.sh
index 7e271e9..ce7d151 100755
--- a/src/shflags_test_parsing.sh
+++ b/shflags_parsing_test.sh
@@ -3,24 +3,34 @@
#
# shFlags unit test for the flag definition methods
#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shflags
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
+
# TODO(kward): assert on FLAGS errors
# TODO(kward): testNonStandardIFS()
-# exit immediately if a pipeline or subshell exits with a non-zero status.
+# Exit immediately if a pipeline or subshell exits with a non-zero status.
#set -e
-# treat unset variables as an error
+# Treat unset variables as an error.
set -u
-# load test helpers
-. ./shflags_test_helpers
+# These variables will be overridden by the test helpers.
+returnF="${TMPDIR:-/tmp}/return"
+stdoutF="${TMPDIR:-/tmp}/STDOUT"
+stderrF="${TMPDIR:-/tmp}/STDERR"
-#------------------------------------------------------------------------------
-# suite tests
-#
+# Load test helpers.
+. ./shflags_test_helpers
-testGetoptStandard()
-{
+testGetoptStandard() {
_flags_getoptStandard '-b' >"${stdoutF}" 2>"${stderrF}"
rslt=$?
assertTrue "didn't parse valid flag 'b'" ${rslt}
@@ -30,8 +40,7 @@ testGetoptStandard()
assertFalse "parsed invalid flag 'x'" $?
}
-testGetoptEnhanced()
-{
+testGetoptEnhanced() {
flags_getoptIsEnh || return
_flags_getoptEnhanced '-b' >"${stdoutF}" 2>"${stderrF}"
@@ -53,7 +62,7 @@ testValidBoolsShort()
value=${FLAGS_bool:-}
assertTrue "-b) boolean was not true (${value})." "${value}"
assertFalse '-b) expected no output to STDERR' "[ -s '${stderrF}' ]"
- test ${r3turn} -eq ${FLAGS_TRUE} -a ! -s "${stderrF}"
+ test ${r3turn} -eq "${FLAGS_TRUE}" -a ! -s "${stderrF}"
th_showOutput $? "${stdoutF}" "${stderrF}"
DEFINE_boolean bool2 true '2nd boolean' B
@@ -61,69 +70,67 @@ testValidBoolsShort()
r3turn=$?
assertTrue "-B) FLAGS returned a non-zero result (${r3turn})" ${r3turn}
value=${FLAGS_bool2:-}
- assertTrue "-B) boolean was not true (${value})" ${value}
+ assertTrue "-B) boolean was not true (${value})" "${value}"
assertFalse '-B) expected no output to STDERR' "[ -s '${stderrF}' ]"
- test ${r3turn} -eq ${FLAGS_TRUE} -a ! -s "${stderrF}"
+ test ${r3turn} -eq "${FLAGS_TRUE}" -a ! -s "${stderrF}"
th_showOutput $? "${stdoutF}" "${stderrF}"
FLAGS -B >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "-B) FLAGS returned a non-zero result (${r3turn})" ${r3turn}
value=${FLAGS_bool2:-}
- assertFalse "-B) boolean was not false (${value})" ${value}
+ assertFalse "-B) boolean was not false (${value})" "${value}"
assertFalse '-B) expected no output to STDERR' "[ -s '${stderrF}' ]"
- test ${r3turn} -eq ${FLAGS_TRUE} -a ! -s "${stderrF}"
+ test ${r3turn} -eq "${FLAGS_TRUE}" -a ! -s "${stderrF}"
th_showOutput $? "${stdoutF}" "${stderrF}"
}
# TODO(kate): separate into multiple functions to reflect correct usage
-testValidBoolsLong()
-{
+testValidBoolsLong() {
flags_getoptIsEnh || return
# Note: the default value of bool is 'false'.
- # leave flag false
+ # Leave flag false.
FLAGS --nobool >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "FLAGS returned a non-zero result (${r3turn})" ${r3turn}
- assertFalse '--noXX flag resulted in true value.' ${FLAGS_bool:-}
+ assertFalse '--noXX flag resulted in true value.' "${FLAGS_bool:-}"
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
- # flip flag true
+ # Flip flag true.
FLAGS --bool >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "FLAGS returned a non-zero result (${r3turn})" ${r3turn}
- assertTrue '--XX flag resulted in false value.' ${FLAGS_bool:-}
+ assertTrue '--XX flag resulted in false value.' "${FLAGS_bool:-}"
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
- # flip flag back false
+ # Flip flag back false.
FLAGS --nobool >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "FLAGS returned a non-zero result (${r3turn})" ${r3turn}
- assertFalse '--noXX flag resulted in true value.' ${FLAGS_bool:-}
+ assertFalse '--noXX flag resulted in true value.' "${FLAGS_bool:-}"
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
}
-testValidFloats()
-{
+testValidFloats() {
_testValidFloats '-f'
flags_getoptIsEnh || return
_testValidFloats '--float'
}
-_testValidFloats()
-{
+_testValidFloats() {
flag=$1
for value in ${TH_FLOAT_VALID}; do
- FLAGS ${flag} ${value} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" "${value}" >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "FLAGS ${flag} ${value} returned non-zero result (${r3turn})" \
${r3turn}
- assertEquals "float (${flag} ${value}) test failed." ${value} ${FLAGS_float}
+ # shellcheck disable=SC2154
+ assertEquals "float (${flag} ${value}) test failed." "${value}" "${FLAGS_float}"
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
done
@@ -142,61 +149,55 @@ _testInvalidFloats()
for value in ${TH_FLOAT_INVALID}; do
th_clearReturn
(
- FLAGS ${flag} ${value} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" "${value}" >"${stdoutF}" 2>"${stderrF}"
echo $? >"${returnF}"
)
- th_queryReturn
- assertFalse "FLAGS (${value}) returned a zero result" ${th_return}
+ assertFalse "FLAGS (${value}) returned a zero result" "$(th_queryReturn)"
assertFalse 'expected no output to STDOUT' "[ -s '${stdoutF}' ]"
assertTrue 'expected output to STDERR' "[ -s '${stderrF}' ]"
done
}
-testValidIntegers()
-{
+testValidIntegers() {
_testValidIntegers '-i'
flags_getoptIsEnh || return
_testValidIntegers '--int'
}
-_testValidIntegers()
-{
+_testValidIntegers() {
flag=$1
for value in ${TH_INT_VALID}; do
- FLAGS ${flag} ${value} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" "${value}" >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "FLAGS (${value}) returned a non-zero result (${r3turn})" ${r3turn}
- assertEquals "integer (${value}) test failed." ${value} ${FLAGS_int}
+ # shellcheck disable=SC2154
+ assertEquals "integer (${value}) test failed." "${value}" "${FLAGS_int}"
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
done
}
-testInvalidIntegers()
-{
+testInvalidIntegers() {
_testInvalidIntegers '-i'
flags_getoptIsEnh || return
_testInvalidIntegers '--int'
}
-_testInvalidIntegers()
-{
+_testInvalidIntegers() {
flag=$1
for value in ${TH_INT_INVALID}; do
th_clearReturn
(
- FLAGS ${flag} ${value} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" "${value}" >"${stdoutF}" 2>"${stderrF}"
echo $? >"${returnF}"
)
- th_queryReturn
- assertFalse "invalid integer (${value}) test returned success." ${th_return}
+ assertFalse "invalid integer (${value}) test returned success." "$(th_queryReturn)"
assertFalse 'expected no output to STDOUT' "[ -s '${stdoutF}' ]"
assertTrue 'expected output to STDERR' "[ -s '${stderrF}' ]"
done
}
-testValidStrings()
-{
+testValidStrings() {
_testValidStrings -s single_word
if flags_getoptIsEnh; then
_testValidStrings --str single_word
@@ -209,52 +210,50 @@ _testValidStrings()
flag=$1
value=$2
- FLAGS ${flag} "${value}" >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" "${value}" >"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "'FLAGS ${flag} ${value}' returned a non-zero result (${r3turn})" \
${r3turn}
+ # shellcheck disable=SC2154
assertEquals "string (${value}) test failed." "${value}" "${FLAGS_str}"
- if [ ${r3turn} -eq ${FLAGS_TRUE} ]; then
+ if [ ${r3turn} -eq "${FLAGS_TRUE}" ]; then
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
else
- # validate that an error is thrown for unsupported getopt uses
+ # Validate that an error is thrown for unsupported getopt uses.
assertFatalMsg '.* spaces in options'
fi
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
}
-testMultipleFlags()
-{
+testMultipleFlags() {
_testMultipleFlags '-b' '-i' '-f' '-s'
flags_getoptIsEnh || return
_testMultipleFlags '--bool' '--int' '--float' '--str'
}
-_testMultipleFlags()
-{
+_testMultipleFlags() {
boolFlag=$1
intFlag=$2
floatFlag=$3
strFlag=$4
FLAGS \
- ${boolFlag} \
- ${intFlag} 567 \
- ${floatFlag} 123.45678 \
- ${strFlag} 'some_string' \
+ "${boolFlag}" \
+ "${intFlag}" 567 \
+ "${floatFlag}" 123.45678 \
+ "${strFlag}" 'some_string' \
>"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue "use of multiple flags returned a non-zero result" ${r3turn}
- assertTrue 'boolean test failed.' ${FLAGS_bool}
- assertNotSame 'float test failed.' 0 ${FLAGS_float}
- assertNotSame 'integer test failed.' 0 ${FLAGS_int}
- assertNotSame 'string test failed.' '' ${FLAGS_str}
+ assertTrue 'boolean test failed.' "${FLAGS_bool}"
+ assertNotSame 'float test failed.' 0 "${FLAGS_float}"
+ assertNotSame 'integer test failed.' 0 "${FLAGS_int}"
+ assertNotSame 'string test failed.' '' "${FLAGS_str}"
assertFalse 'expected no output to STDERR' "[ -s '${stderrF}' ]"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
}
-_testNonFlagArgs()
-{
+_testNonFlagArgs() {
argc=$1
shift
@@ -264,17 +263,15 @@ _testNonFlagArgs()
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
eval set -- "${FLAGS_ARGV}"
- assertEquals 'wrong count of argv arguments returned.' ${argc} $#
- assertEquals 'wrong count of argc arguments returned.' 0 ${FLAGS_ARGC}
+ assertEquals 'wrong count of argv arguments returned.' "${argc}" $#
+ assertEquals 'wrong count of argc arguments returned.' 0 "${FLAGS_ARGC}"
}
-testSingleNonFlagArg()
-{
+testSingleNonFlagArg() {
_testNonFlagArgs 1 argOne
}
-testMultipleNonFlagArgs()
-{
+testMultipleNonFlagArgs() {
_testNonFlagArgs 3 argOne argTwo arg3
}
@@ -295,11 +292,10 @@ testFlagsWithEquals()
eval set -- "${FLAGS_ARGV}"
assertEquals 'wrong count of argv arguments returned.' 1 $#
- assertEquals 'wrong count of argc arguments returned.' 1 ${FLAGS_ARGC}
+ assertEquals 'wrong count of argc arguments returned.' 1 "${FLAGS_ARGC}"
}
-testComplicatedCommandLineStandard()
-{
+testComplicatedCommandLineStandard() {
flags_getoptIsEnh && return
# Note: standard getopt stops parsing after first non-flag argument, which
@@ -308,36 +304,30 @@ testComplicatedCommandLineStandard()
>"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue 'FLAGS returned a non-zero result' ${r3turn}
- assertEquals 'failed int test' 1 ${FLAGS_int}
+ assertEquals 'failed int test' 1 "${FLAGS_int}"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
eval set -- "${FLAGS_ARGV}"
assertEquals 'incorrect number of argv values' 7 $#
}
-testComplicatedCommandLineEnhanced()
-{
+testComplicatedCommandLineEnhanced() {
flags_getoptIsEnh || return
FLAGS -i 1 non_flag_1 --str='two' non_flag_2 --float 3 'non flag 3' \
>"${stdoutF}" 2>"${stderrF}"
r3turn=$?
assertTrue 'FLAGS returned a non-zero result' ${r3turn}
- assertEquals 'failed int test' 1 ${FLAGS_int}
+ assertEquals 'failed int test' 1 "${FLAGS_int}"
assertEquals 'failed str test' 'two' "${FLAGS_str}"
- assertEquals 'failed float test' 3 ${FLAGS_float}
+ assertEquals 'failed float test' 3 "${FLAGS_float}"
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
eval set -- "${FLAGS_ARGV}"
assertEquals 'incorrect number of argv values' 3 $#
}
-#------------------------------------------------------------------------------
-# suite functions
-#
-
-oneTimeSetUp()
-{
+oneTimeSetUp() {
th_oneTimeSetUp
if flags_getoptIsStd; then
@@ -347,19 +337,18 @@ oneTimeSetUp()
fi
}
-setUp()
-{
+setUp() {
DEFINE_boolean bool false 'boolean test' 'b'
DEFINE_float float 0.0 'float test' 'f'
DEFINE_integer int 0 'integer test' 'i'
DEFINE_string str '' 'string test' 's'
}
-tearDown()
-{
+tearDown() {
flags_reset
}
-# load and run shUnit2
+# Load and run shUnit2.
+# shellcheck disable=SC2034
[ -n "${ZSH_VERSION:-}" ] && SHUNIT_PARENT=$0
-. ${TH_SHUNIT}
+. "${TH_SHUNIT}"
diff --git a/src/shflags_test_private.sh b/shflags_private_test.sh
index 8941b5c..4911521 100755
--- a/src/shflags_test_private.sh
+++ b/shflags_private_test.sh
@@ -1,24 +1,37 @@
#! /bin/sh
# vim:et:ft=sh:sts=2:sw=2
#
-# shFlags unit test for the internal functions
-
-# load test helpers
-. ./shflags_test_helpers
-
-#------------------------------------------------------------------------------
-# suite tests
+# shFlags unit tests for the internal functions.
+#
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shflags
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
+# expr may be antiquated, but it is the only solution in some cases.
+# shellcheck disable=SC2003
+# $() are not fully portable (POSIX != portable).
+# shellcheck disable=SC2006
+
+# These variables will be overridden by the test helpers.
+stdoutF="${TMPDIR:-/tmp}/STDOUT"
+stderrF="${TMPDIR:-/tmp}/STDERR"
+
+# Load test helpers.
+. ./shflags_test_helpers
-testColumns()
-{
+testColumns() {
cols=`_flags_columns`
value=`expr "${cols}" : '\([0-9]*\)'`
assertNotNull "unexpected screen width (${cols})" "${value}"
}
-testGenOptStr()
-{
+testGenOptStr() {
_testGenOptStr '' ''
DEFINE_boolean bool false 'boolean value' b
@@ -37,22 +50,20 @@ testGenOptStr()
_testGenOptStr 'bf:i:s:h' 'bool,float:,int:,str:,help'
}
-_testGenOptStr()
-{
+_testGenOptStr() {
short=$1
long=$2
- result=`_flags_genOptStr ${__FLAGS_OPTSTR_SHORT}`
+ result=$(_flags_genOptStr "${__FLAGS_OPTSTR_SHORT}")
assertTrue 'short option string generation failed' $?
assertEquals "${short}" "${result}"
- result=`_flags_genOptStr ${__FLAGS_OPTSTR_LONG}`
+ result=`_flags_genOptStr "${__FLAGS_OPTSTR_LONG}"`
assertTrue 'long option string generation failed' $?
assertEquals "${long}" "${result}"
}
-testGetFlagInfo()
-{
+testGetFlagInfo() {
__flags_blah_foobar='1234'
rslt=`_flags_getFlagInfo 'blah' 'foobar'`
@@ -60,16 +71,17 @@ testGetFlagInfo()
assertEquals 'invalid flag info returned' "${__flags_blah_foobar}" "${rslt}"
rslt=`_flags_getFlagInfo 'blah' 'hubbabubba' >"${stdoutF}" 2>"${stderrF}"`
- assertEquals 'invalid flag did not result in an error' ${FLAGS_ERROR} $?
+ assertEquals 'invalid flag did not result in an error' "${FLAGS_ERROR}" $?
assertErrorMsg 'missing flag info variable'
}
testItemInList() {
list='this is a test'
+ # shellcheck disable=SC2162
while read desc item want; do
- _flags_itemInList "${item}" ${list}
+ _flags_itemInList "${item}" "${list}"
got=$?
- assertEquals "${desc}: itemInList(${item})" ${got} ${want}
+ assertEquals "${desc}: itemInList(${item})" "${got}" "${want}"
done <<EOF
lead_item this ${FLAGS_TRUE}
middle_item is ${FLAGS_TRUE}
@@ -85,161 +97,143 @@ EOF
assertFalse 'empty lists should not match' $?
}
-testValidBool()
-{
- # valid values
+testValidBool() {
+ # Valid values.
for value in ${TH_BOOL_VALID}; do
_flags_validBool "${value}"
assertTrue "valid value (${value}) did not validate" $?
done
- # invalid values
+ # Invalid values.
for value in ${TH_BOOL_INVALID}; do
_flags_validBool "${value}"
assertFalse "invalid value (${value}) validated" $?
done
}
-_testValidFloat()
-{
- # valid values
+_testValidFloat() {
+ # Valid values.
for value in ${TH_INT_VALID} ${TH_FLOAT_VALID}; do
_flags_validFloat "${value}"
assertTrue "valid value (${value}) did not validate" $?
done
- # invalid values
+ # Invalid values.
for value in ${TH_FLOAT_INVALID}; do
_flags_validFloat "${value}"
assertFalse "invalid value (${value}) validated" $?
done
}
-testValidFloatBuiltin()
-{
+testValidFloatBuiltin() {
_flags_useBuiltin || startSkipping
_testValidFloat
}
-testValidFloatExpr()
-{
+testValidFloatExpr() {
(
- _flags_useBuiltin() { return ${FLAGS_FALSE}; }
+ _flags_useBuiltin() { return "${FLAGS_FALSE}"; }
_testValidFloat
)
}
-_testValidInt()
-{
- # valid values
+_testValidInt() {
+ # Valid values.
for value in ${TH_INT_VALID}; do
_flags_validInt "${value}"
assertTrue "valid value (${value}) did not validate" $?
done
- # invalid values
+ # Invalid values.
for value in ${TH_INT_INVALID}; do
_flags_validInt "${value}"
assertFalse "invalid value (${value}) should not validate" $?
done
}
-testValidIntBuiltin()
-{
+testValidIntBuiltin() {
_flags_useBuiltin || startSkipping
_testValidInt
}
-testValidIntExpr()
-{
+testValidIntExpr() {
(
- _flags_useBuiltin() { return ${FLAGS_FALSE}; }
+ _flags_useBuiltin() { return "${FLAGS_FALSE}"; }
_testValidInt
)
}
-_testMath()
-{
+_testMath() {
result=`_flags_math 1`
assertTrue '1 failed' $?
- assertEquals '1' 1 ${result}
+ assertEquals '1' 1 "${result}"
result=`_flags_math '1 + 2'`
assertTrue '1+2 failed' $?
- assertEquals '1+2' 3 ${result}
+ assertEquals '1+2' 3 "${result}"
result=`_flags_math '1 + 2 + 3'`
assertTrue '1+2+3 failed' $?
- assertEquals '1+2+3' 6 ${result}
+ assertEquals '1+2+3' 6 "${result}"
result=`_flags_math`
assertFalse 'missing math succeeded' $?
}
-testMathBuiltin()
-{
+testMathBuiltin() {
_flags_useBuiltin || startSkipping
_testMath
}
-testMathExpr()
-{
+testMathExpr() {
(
- _flags_useBuiltin() { return ${FLAGS_FALSE}; }
+ _flags_useBuiltin() { return "${FLAGS_FALSE}"; }
_testMath
)
}
-_testStrlen()
-{
+_testStrlen() {
len=`_flags_strlen`
assertTrue 'missing argument failed' $?
- assertEquals 'missing argument' 0 ${len}
+ assertEquals 'missing argument' 0 "${len}"
len=`_flags_strlen ''`
assertTrue 'empty argument failed' $?
- assertEquals 'empty argument' 0 ${len}
+ assertEquals 'empty argument' 0 "${len}"
len=`_flags_strlen abc123`
assertTrue 'single-word failed' $?
- assertEquals 'single-word' 6 ${len}
+ assertEquals 'single-word' 6 "${len}"
len=`_flags_strlen 'This is a test'`
assertTrue 'multi-word failed' $?
- assertEquals 'multi-word' 14 ${len}
+ assertEquals 'multi-word' 14 "${len}"
}
-testStrlenBuiltin()
-{
+testStrlenBuiltin() {
_flags_useBuiltin || startSkipping
_testStrlen
}
-testStrlenExpr()
-{
+testStrlenExpr() {
(
- _flags_useBuiltin() { return ${FLAGS_FALSE}; }
+ _flags_useBuiltin() { return "${FLAGS_FALSE}"; }
_testStrlen
)
}
-#------------------------------------------------------------------------------
-# suite functions
-#
-
-oneTimeSetUp()
-{
+oneTimeSetUp() {
th_oneTimeSetUp
_flags_useBuiltin || \
th_warn 'Shell built-ins not supported. Some tests will be skipped.'
}
-tearDown()
-{
+tearDown() {
flags_reset
}
-# load and run shUnit2
+# Load and run shUnit2.
+# shellcheck disable=SC2034
[ -n "${ZSH_VERSION:-}" ] && SHUNIT_PARENT=$0
-. ${TH_SHUNIT}
+. "${TH_SHUNIT}"
diff --git a/src/shflags_test_public.sh b/shflags_public_test.sh
index 32e3076..41eacba 100755
--- a/src/shflags_test_public.sh
+++ b/shflags_public_test.sh
@@ -2,61 +2,70 @@
# vim:et:ft=sh:sts=2:sw=2
#
# shFlags unit test for the public functions.
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shflags
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
-# load test helpers
-. ./shflags_test_helpers
+# These variables will be overridden by the test helpers.
+expectedF="${TMPDIR:-/tmp}/expected"
+returnF="${TMPDIR:-/tmp}/return"
+stdoutF="${TMPDIR:-/tmp}/STDOUT"
+stderrF="${TMPDIR:-/tmp}/STDERR"
-#------------------------------------------------------------------------------
-# Suite tests.
-#
+# Load test helpers.
+. ./shflags_test_helpers
-testHelp()
-{
+testHelp() {
_testHelp '-h'
flags_getoptIsEnh || return
_testHelp '--help'
}
-_testHelp()
-{
+_testHelp() {
flag=$1
- # test default help output
+ # Test default help output.
th_clearReturn
(
- FLAGS ${flag} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" >"${stdoutF}" 2>"${stderrF}"
echo $? >"${returnF}"
)
- th_queryReturn
- assertTrue \
- 'short help request should have returned a true exit code.' \
- ${th_return}
+ assertFalse \
+ 'a call for help should return a non-zero exit code.' \
+ "$(th_queryReturn)"
grep 'show this help' "${stderrF}" >/dev/null
grepped=$?
assertTrue \
'short request for help should have produced some help output.' \
${grepped}
- [ ${grepped} -ne ${FLAGS_TRUE} ] && th_showOutput
+ [ ${grepped} -ne "${FLAGS_TRUE}" ] && th_showOutput
- # test proper output when FLAGS_HELP set
+ # Test proper output when FLAGS_HELP set.
(
FLAGS_HELP='this is a test'
- FLAGS ${flag} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" >"${stdoutF}" 2>"${stderrF}"
)
grep 'this is a test' "${stderrF}" >/dev/null
grepped=$?
assertTrue 'setting FLAGS_HELP did not produce expected result' ${grepped}
- [ ${grepped} -ne ${FLAGS_TRUE} ] && th_showOutput
+ [ ${grepped} -ne "${FLAGS_TRUE}" ] && th_showOutput
# test that "'" chars work in help string
(
DEFINE_boolean b false "help string containing a ' char" b
- FLAGS ${flag} >"${stdoutF}" 2>"${stderrF}"
+ FLAGS "${flag}" >"${stdoutF}" 2>"${stderrF}"
)
grep "help string containing a ' char" "${stderrF}" >/dev/null
grepped=$?
assertTrue "help strings containing apostrophes don't work" ${grepped}
- [ ${grepped} -ne ${FLAGS_TRUE} ] && th_showOutput
+ [ ${grepped} -ne "${FLAGS_TRUE}" ] && th_showOutput
}
mock_flags_columns()
@@ -64,8 +73,7 @@ mock_flags_columns()
echo 80
}
-testStandardHelpOutput()
-{
+testStandardHelpOutput() {
flags_getoptIsStd || startSkipping
DEFINE_boolean test_bool false 'test boolean' b
@@ -94,9 +102,11 @@ EOF
_flags_columns() { mock_flags_columns; }
FLAGS_HELP=${help};
FLAGS -h >"${stdoutF}" 2>"${stderrF}"
+ echo $? >"${returnF}"
)
- r3turn=$?
- assertTrue 'a call for help should not return an error' ${r3turn}
+ assertFalse \
+ 'a call for help should return a non-zero exit code.' \
+ "$(th_queryReturn)"
diff "${expectedF}" "${stderrF}" >/dev/null
r3turn=$?
@@ -104,8 +114,7 @@ EOF
th_showOutput ${r3turn} "${stdoutF}" "${stderrF}"
}
-testEnhancedHelpOutput()
-{
+testEnhancedHelpOutput() {
flags_getoptIsEnh || startSkipping
DEFINE_boolean test_bool false 'test boolean' b
@@ -132,11 +141,14 @@ flags:
EOF
(
_flags_columns() { mock_flags_columns; }
+ # shellcheck disable=SC2034
FLAGS_HELP=${help};
FLAGS -h >"${stdoutF}" 2>"${stderrF}"
+ echo $? >"${returnF}"
)
- r3turn=$?
- assertTrue 'a call for help should not return an error' ${r3turn}
+ assertFalse \
+ 'a call for help should return a non-zero exit code.' \
+ "$(th_queryReturn)"
diff "${expectedF}" "${stderrF}" >/dev/null
differed=$?
@@ -144,8 +156,7 @@ EOF
th_showOutput ${differed} "${stdoutF}" "${stderrF}"
}
-testNoHelp()
-{
+testNoHelp() {
flags_getoptIsEnh || startSkipping
( FLAGS --nohelp >"${stdoutF}" 2>"${stderrF}" )
@@ -161,16 +172,12 @@ testLoggingLevel() {
assertTrue "Unexpected default logging level = ${got}, want ${want}" "[ ${got} -eq ${want} ]"
# Override the logging level, and check again.
- flags_setLoggingLevel ${FLAGS_LEVEL_FATAL}
- flags_setLoggingLevel ${FLAGS_LEVEL_INFO}
+ flags_setLoggingLevel "${FLAGS_LEVEL_FATAL}"
+ flags_setLoggingLevel "${FLAGS_LEVEL_INFO}"
got=$(flags_loggingLevel) want=${FLAGS_LEVEL_INFO}
assertTrue "Unexpected configured logging level = ${got}, want ${want}" "[ ${got} -eq ${want} ]"
}
-#------------------------------------------------------------------------------
-# Suite functions.
-#
-
oneTimeSetUp() {
th_oneTimeSetUp
@@ -186,5 +193,6 @@ setUp() {
}
# Load and run shUnit2.
+# shellcheck disable=SC2034
[ -n "${ZSH_VERSION:-}" ] && SHUNIT_PARENT=$0
-. ${TH_SHUNIT}
+. "${TH_SHUNIT}"
diff --git a/shflags_test_helpers b/shflags_test_helpers
new file mode 100644
index 0000000..971367f
--- /dev/null
+++ b/shflags_test_helpers
@@ -0,0 +1,127 @@
+# vim:et:ft=sh:sts=2:sw=2
+#
+# shFlags unit test common functions
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shflags
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
+# $() are not fully portable (POSIX != portable).
+# shellcheck disable=SC2006
+# Disagree with [ p ] && [ q ] vs [ p -a -q ] recommendation.
+# shellcheck disable=SC2166
+
+# Treat unset variables as an error.
+set -u
+
+# Set shwordsplit for zsh.
+[ -n "${ZSH_VERSION:-}" ] && setopt shwordsplit
+
+# Message functions.
+th_trace() { echo "test:TRACE $*" >&2; }
+th_debug() { echo "test:DEBUG $*" >&2; }
+th_info() { echo "test:INFO $*" >&2; }
+th_warn() { echo "test:WARN $*" >&2; }
+th_error() { echo "test:ERROR $*" >&2; }
+th_fatal() { echo "test:FATAL $*" >&2; exit 1; }
+
+# My name.
+TH_MY_NAME=`basename "$0"` || th_fatal 'Error executing basename.'
+export TH_MY_NAME
+
+# Path to shFlags library. Can be overridden by setting SHFLAGS_INC.
+export TH_SHFLAGS=${SHFLAGS_INC:-./shflags}
+
+# Path to shUnit2 library. Can be overridden by setting SHUNIT_INC.
+export TH_SHUNIT=${SHUNIT_INC:-lib/shunit2}
+
+export TH_BOOL_VALID='true t 0 false f 1'
+export TH_BOOL_INVALID='123 123.0 invalid'
+export TH_FLOAT_VALID='-1234.0 -1.0 -.123 0.0 0. .123 1.0 1234.0'
+export TH_FLOAT_INVALID='true false 1.2.3 -1.2.3 ""'
+export TH_INT_VALID='-1234 -1 0 1 1234'
+export TH_INT_INVALID='true false -1.0 -.123 0.0 .123 1.0 ""'
+
+#
+# Test helper functions.
+#
+
+th_oneTimeSetUp() {
+ # Load shFlags.
+ # shellcheck disable=SC2034
+ [ -n "${ZSH_VERSION:-}" ] && FLAGS_PARENT=$0
+ . "${TH_SHFLAGS}"
+
+ # These files will be cleaned up automatically by shUnit2.
+ export tmpDir=${SHUNIT_TMPDIR}
+ stdoutF="${tmpDir}/stdout" && touch "${stdoutF}"
+ stderrF="${tmpDir}/stderr" && touch "${stderrF}"
+ returnF="${tmpDir}/return" && touch "${returnF}"
+ expectedF="${tmpDir}/expected" && touch "${expectedF}"
+}
+
+th_showOutput() {
+ _th_rtrn=$1
+ _th_stdout=$2
+ _th_stderr=$3
+
+ isSkipping
+ if [ $? -eq "${SHUNIT_FALSE}" -a "${_th_rtrn}" != "${FLAGS_TRUE}" ]; then
+ if [ -n "${_th_stdout}" -a -s "${_th_stdout}" ]; then
+ echo '>>> STDOUT' >&2
+ cat "${_th_stdout}" >&2
+ fi
+ if [ -n "${_th_stderr}" -a -s "${_th_stderr}" ]; then
+ echo '>>> STDERR' >&2
+ cat "${_th_stderr}" >&2
+ fi
+ if [ -n "${_th_stdout}" -o -n "${_th_stderr}" ]; then
+ echo '<<< end output' >&2
+ fi
+ fi
+
+ unset _th_rtrn _th_stdout _th_stderr
+}
+
+# Some shells, zsh on Solaris in particular, return immediately from a sub-shell
+# when a non-zero return value is encountered. To properly catch these values,
+# they are either written to disk, or recognized as an error the file is empty.
+th_clearReturn() { cp /dev/null "${returnF}"; }
+th_queryReturn() {
+ if [ -s "${returnF}" ]; then
+ cat "${returnF}"
+ return $?
+ fi
+ echo "${SHUNIT_ERROR}"
+ return "${SHUNIT_ERROR}"
+}
+
+_th_assertMsg() {
+ _th_alert_type_=$1
+ _th_alert_msg_=$2
+ _th_msg_=$3
+
+ case ${_th_alert_type_} in
+ WARN) _th_alert_str_='a warning' ;;
+ ERROR) _th_alert_str_='an error' ;;
+ FATAL) _th_alert_str_='a fatal' ;;
+ esac
+ [ -z "${_th_alert_msg_}" ] && _th_alert_msg_='.*'
+ [ -n "${_th_msg_}" ] && _th_msg_="(${_th_msg_}) "
+
+ grep -- "^flags:${_th_alert_type_} ${_th_alert_msg_}" "${stderrF}" \
+ >/dev/null
+ assertTrue \
+ "FLAGS ${_th_msg_}failure did not generate ${_th_alert_str_} message" $?
+
+ unset _th_alert_type_ _th_alert_msg_ _th_alert_str_ _th_msg_
+}
+
+assertWarnMsg() { _th_assertMsg 'WARN' "${1:-}" "${2:-}"; }
+assertErrorMsg() { _th_assertMsg 'ERROR' "${1:-}" "${2:-}"; }
+assertFatalMsg() { _th_assertMsg 'FATAL' "${1:-}" "${2:-}"; }
diff --git a/src/shflags_test.sh b/src/shflags_test.sh
deleted file mode 100755
index 38d1b39..0000000
--- a/src/shflags_test.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#! /bin/sh
-# vim:et:ft=sh:sts=2:sw=2
-#
-# shFlags unit test suite runner.
-#
-# This script runs all the unit tests that can be found, and generates a nice
-# report of the tests.
-
-MY_NAME=`basename $0`
-MY_PATH=`dirname $0`
-
-PREFIX='shflags_test_'
-SHELLS='/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh'
-TESTS=''
-for test in ${PREFIX}[a-z]*.sh; do
- TESTS="${TESTS} ${test}"
-done
-
-# Load libraries.
-. ../lib/versions
-. ./shflags_test_helpers
-
-usage() {
- echo "usage: ${MY_NAME} [-e key=val ...] [-s shell(s)] [-t test(s)]"
-}
-
-env=''
-
-# Process command line flags.
-while getopts 'e:hs:t:' opt; do
- case ${opt} in
- e) # set an environment variable
- key=`expr "${OPTARG}" : '\([^=]*\)='`
- val=`expr "${OPTARG}" : '[^=]*=\(.*\)'`
- if [ -z "${key}" -o -z "${val}" ]; then
- usage
- exit 1
- fi
- eval "${key}='${val}'"
- export ${key}
- env="${env:+${env} }${key}"
- ;;
- h) usage; exit 0 ;; # help output
- s) shells=${OPTARG} ;; # list of shells to run
- t) tests=${OPTARG} ;; # list of tests to run
- *) usage; exit 1 ;;
- esac
-done
-shift `expr ${OPTIND} - 1`
-
-# Fill shells and/or tests.
-shells=${shells:-${SHELLS}}
-tests=${tests:-${TESTS}}
-
-# Error checking.
-if [ -z "${tests}" ]; then
- th_error 'no tests found to run; exiting'
- exit 1
-fi
-
-cat <<EOF
-#------------------------------------------------------------------------------
-# System data.
-#
-
-$ uname -mprsv
-`uname -mprsv`
-
-OS Name: `versions_osName`
-OS Version: `versions_osVersion`
-
-### Test run info.
-shells: ${shells}
-tests: ${tests}
-EOF
-for key in ${env}; do
- eval "echo \"${key}=\$${key}\""
-done
-
-# Run tests.
-for shell in ${shells}; do
- echo
-
- cat <<EOF
-
-#------------------------------------------------------------------------------
-# Running the test suite with ${shell}.
-#
-EOF
- # Check for existence of shell.
- if [ ! -x ${shell} ]; then
- th_warn "unable to run tests with the ${shell} shell"
- continue
- fi
-
- shell_name=`basename ${shell}`
- shell_version=`versions_shellVersion "${shell}"`
-
- echo "shell name: ${shell_name}"
- echo "shell version: ${shell_version}"
-
- # Execute the tests.
- for suite in ${tests}; do
- suiteName=`expr "${suite}" : "${PREFIX}\(.*\).sh"`
- echo
- echo "--- Executing the '${suiteName}' test suite. ---"
- ( exec ${shell} ./${suite} 2>&1; )
- done
-done
diff --git a/src/shflags_test_helpers b/src/shflags_test_helpers
deleted file mode 100644
index d00f31e..0000000
--- a/src/shflags_test_helpers
+++ /dev/null
@@ -1,116 +0,0 @@
-# vim:et:ft=sh:sts=2:sw=2
-#
-# shFlags unit test common functions
-
-__th_skipping=0
-
-# treat unset variables as an error
-set -u
-
-# set shwordsplit for zsh
-[ -n "${ZSH_VERSION:-}" ] && setopt shwordsplit
-
-# my name
-TH_MY_NAME=`basename "$0"`
-
-# path to shFlags library. can be overridden by setting SHFLAGS_INC
-TH_SHFLAGS=${SHFLAGS_INC:-./shflags}
-
-# path to shUnit2 library. can be overridden by setting SHUNIT_INC
-TH_SHUNIT=${SHUNIT_INC:-../lib/shunit2}
-
-TH_BOOL_VALID='true t 0 false f 1'
-TH_BOOL_INVALID='123 123.0 invalid'
-TH_FLOAT_VALID='-1234.0 -1.0 -.123 0.0 0. .123 1.0 1234.0'
-TH_FLOAT_INVALID='true false 1.2.3 -1.2.3 ""'
-TH_INT_VALID='-1234 -1 0 1 1234'
-TH_INT_INVALID='true false -1.0 -.123 0.0 .123 1.0 ""'
-
-#
-# test helper functions
-#
-
-# message functions
-th_trace() { echo "test:TRACE $@" >&2; }
-th_debug() { echo "test:DEBUG $@" >&2; }
-th_info() { echo "test:INFO $@" >&2; }
-th_warn() { echo "test:WARN $@" >&2; }
-th_error() { echo "test:ERROR $@" >&2; }
-th_fatal() { echo "test:FATAL $@" >&2; }
-
-th_oneTimeSetUp()
-{
- # load shFlags
- [ -n "${ZSH_VERSION:-}" ] && FLAGS_PARENT=$0
- . ${TH_SHFLAGS}
-
- # these files will be cleaned up automatically by shUnit2
- tmpDir=${SHUNIT_TMPDIR}
- stdoutF="${tmpDir}/stdout"
- stderrF="${tmpDir}/stderr"
- returnF="${tmpDir}/return"
- expectedF="${tmpDir}/expected"
-}
-
-th_showOutput()
-{
- _th_rtrn=$1
- _th_stdout=$2
- _th_stderr=$3
-
- isSkipping
- if [ $? -eq ${SHUNIT_FALSE} -a ${_th_rtrn} != ${FLAGS_TRUE} ]; then
- if [ -n "${_th_stdout}" -a -s "${_th_stdout}" ]; then
- echo '>>> STDOUT' >&2
- cat "${_th_stdout}" >&2
- fi
- if [ -n "${_th_stderr}" -a -s "${_th_stderr}" ]; then
- echo '>>> STDERR' >&2
- cat "${_th_stderr}" >&2
- fi
- if [ -n "${_th_stdout}" -o -n "${_th_stderr}" ]; then
- echo '<<< end output' >&2
- fi
- fi
-
- unset _th_rtrn _th_stdout _th_stderr
-}
-
-# Some shells, zsh on Solaris in particular, return immediately from a sub-shell
-# when a non-zero return value is encountered. To properly catch these values,
-# they are either written to disk, or recognized as an error the file is empty.
-th_clearReturn() { cp /dev/null "${returnF}"; }
-th_queryReturn()
-{
- if [ -s "${returnF}" ]; then
- th_return=`cat "${returnF}"`
- else
- th_return=${SHUNIT_ERROR}
- fi
-}
-
-_th_assertMsg()
-{
- _th_alert_type_=$1
- _th_alert_msg_=$2
- _th_msg_=$3
-
- case ${_th_alert_type_} in
- WARN) _th_alert_str_='a warning' ;;
- ERROR) _th_alert_str_='an error' ;;
- FATAL) _th_alert_str_='a fatal' ;;
- esac
- [ -z "${_th_alert_msg_}" ] && _th_alert_msg_='.*'
- [ -n "${_th_msg_}" ] && _th_msg_="(${_th_msg_}) "
-
- grep -- "^flags:${_th_alert_type_} ${_th_alert_msg_}" "${stderrF}" \
- >/dev/null
- assertTrue \
- "FLAGS ${_th_msg_}failure did not generate ${_th_alert_str_} message" $?
-
- unset _th_alert_type_ _th_alert_msg_ _th_alert_str_ _th_msg_
-}
-
-assertWarnMsg() { _th_assertMsg 'WARN' "${1:-}" "${2:-}"; }
-assertErrorMsg() { _th_assertMsg 'ERROR' "${1:-}" "${2:-}"; }
-assertFatalMsg() { _th_assertMsg 'FATAL' "${1:-}" "${2:-}"; }
diff --git a/test_results/1.0.1/Linux-Ubuntu_Dapper-6.06.txt b/test_results/1.0.1/Linux-Ubuntu_Dapper-6.06.txt
deleted file mode 100644
index 3aabbf2..0000000
--- a/test_results/1.0.1/Linux-Ubuntu_Dapper-6.06.txt
+++ /dev/null
@@ -1,430 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Fri Jul 11 16:40:56 IST 2008
-$ uname -mprsv
-Linux 2.6.18.5-gg34workstation-mixed64-32 #1 SMP Thu May 8 01:31:23 UTC 2008 x86_64 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-
-GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
-Copyright (C) 2005 Free Software Foundation, Inc.
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/dash shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-
-version: 4.2.5
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
diff --git a/test_results/1.0.1/Linux-Ubuntu_Hardy-8.04.txt b/test_results/1.0.1/Linux-Ubuntu_Hardy-8.04.txt
deleted file mode 100644
index 537c17d..0000000
--- a/test_results/1.0.1/Linux-Ubuntu_Hardy-8.04.txt
+++ /dev/null
@@ -1,512 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Fri Jul 11 20:41:28 GMT 2008
-$ uname -mprsv
-Linux 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-
-GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
-Copyright (C) 2007 Free Software Foundation, Inc.
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
- version sh (AT&T Research) 1993-12-28 s+
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-
-version: 4.3.4
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 179 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 8 89%
-tests failed: 0 0%
-tests skipped: 1 11%
-tests total: 9 100%
diff --git a/test_results/1.0.1/Mac_OS_X-10.5.4.txt b/test_results/1.0.1/Mac_OS_X-10.5.4.txt
deleted file mode 100644
index c4a3262..0000000
--- a/test_results/1.0.1/Mac_OS_X-10.5.4.txt
+++ /dev/null
@@ -1,368 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Fri Jul 11 21:38:16 IST 2008
-$ uname -mprsv
-Darwin 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386 i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-
-GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
-Copyright (C) 2005 Free Software Foundation, Inc.
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/dash shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
- version sh (AT&T Research) 1993-12-28 s+
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/pdksh shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-
-version: 4.3.4
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
diff --git a/test_results/1.0.1/Solaris-9-U6-x86.txt b/test_results/1.0.1/Solaris-9-U6-x86.txt
deleted file mode 100644
index 1f223cc..0000000
--- a/test_results/1.0.1/Solaris-9-U6-x86.txt
+++ /dev/null
@@ -1,366 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Fri Jul 11 20:26:24 GMT 2008
-$ uname -mprsv
-SunOS 5.9 Generic_117172-08 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-
-GNU bash, version 2.05.0(1)-release (i386-pc-solaris2.9)
-Copyright 2000 Free Software Foundation, Inc.
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/dash shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/pdksh shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-
-version: 3.0.8
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
diff --git a/test_results/1.0.1/Solaris-nv-77-x86.txt b/test_results/1.0.1/Solaris-nv-77-x86.txt
deleted file mode 100644
index 1ba12ae..0000000
--- a/test_results/1.0.1/Solaris-nv-77-x86.txt
+++ /dev/null
@@ -1,366 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Fri Jul 11 20:32:34 GMT 2008
-$ uname -mprsv
-SunOS 5.11 snv_77 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-
-GNU bash, version 3.2.25(1)-release (i386-pc-solaris2.11)
-Copyright (C) 2005 Free Software Foundation, Inc.
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/dash shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
-
-test:WARN unable to run tests with the /bin/pdksh shell
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-
-version: 4.3.4
-
---- Executing the 'defines' test suite ---
-#
-# Performing tests
-#
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-#
-# Test report
-#
-tests passed: 65 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 65 100%
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-#
-# Performing tests
-#
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result
-ASSERT:string (string with spaces) test failed.string (string with spaces) test failed. expected:<string with spaces> but was:<>
-flags:ERROR the available getopt does not support spaces in options
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-#
-# Test report
-#
-tests passed: 89 50%
-tests failed: 2 1%
-tests skipped: 88 49%
-tests total: 179 100%
-
---- Executing the 'private' test suite ---
-#
-# Performing tests
-#
-testGetFlagInfo
-testItemInList
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-#
-# Test report
-#
-tests passed: 50 100%
-tests failed: 0 0%
-tests skipped: 0 0%
-tests total: 50 100%
-
---- Executing the 'public' test suite ---
-#
-# Performing tests
-#
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-
-#
-# Test report
-#
-tests passed: 5 56%
-tests failed: 0 0%
-tests skipped: 4 44%
-tests total: 9 100%
diff --git a/test_results/1.0.2/Linux-Red_Hat_Linux_release_9_(Shrike).txt b/test_results/1.0.2/Linux-Red_Hat_Linux_release_9_(Shrike).txt
deleted file mode 100644
index 2a37140..0000000
--- a/test_results/1.0.2/Linux-Red_Hat_Linux_release_9_(Shrike).txt
+++ /dev/null
@@ -1,214 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Nov 15 12:24:30 PST 2008
-$ uname -mprsv
-Linux 2.4.22-gg17smp #17 SMP Thu Oct 4 14:35:48 IST 2007 i686 i686
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 2.05b.0(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.1.1
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
diff --git a/test_results/1.0.2/Linux-Ubuntu-6.06.txt b/test_results/1.0.2/Linux-Ubuntu-6.06.txt
deleted file mode 100644
index 6888a72..0000000
--- a/test_results/1.0.2/Linux-Ubuntu-6.06.txt
+++ /dev/null
@@ -1,328 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Nov 15 20:07:22 GMT 2008
-$ uname -mprsv
-Linux 2.6.18.5-gg38server-xenU-3.1 #1 SMP Fri Jul 18 13:02:34 IST 2008 x86_64 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.1.17(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28-r--$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.2.5
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
diff --git a/test_results/1.0.2/Linux-Ubuntu-8.04.txt b/test_results/1.0.2/Linux-Ubuntu-8.04.txt
deleted file mode 100644
index 4b17c8d..0000000
--- a/test_results/1.0.2/Linux-Ubuntu-8.04.txt
+++ /dev/null
@@ -1,379 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Nov 15 17:17:19 GMT 2008
-$ uname -mprsv
-Linux 2.6.24-21-server #1 SMP Wed Oct 22 00:18:13 UTC 2008 i686 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.39(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-shell name: dash
-shell version: 0.5.4-8ubuntu1
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
diff --git a/test_results/1.0.2/Mac_OS_X-10.5.5.txt b/test_results/1.0.2/Mac_OS_X-10.5.5.txt
deleted file mode 100644
index e60f1cc..0000000
--- a/test_results/1.0.2/Mac_OS_X-10.5.5.txt
+++ /dev/null
@@ -1,291 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Nov 15 20:17:09 GMT 2008
-$ uname -mprsv
-Darwin 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386 i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.17(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
diff --git a/test_results/1.0.2/Solaris-11.txt b/test_results/1.0.2/Solaris-11.txt
deleted file mode 100644
index 929021f..0000000
--- a/test_results/1.0.2/Solaris-11.txt
+++ /dev/null
@@ -1,283 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Nov 15 00:06:53 GMT 2008
-$ uname -mprsv
-SunOS 5.11 snv_77 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.25(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-11/16/88i
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Some tests will be skipped.
-testStandardGetopt
-testEnhancedGetopt
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-ASSERT:FLAGS (string with spaces) returned a non-zero result (2)
-ASSERT:string (string with spaces) test failed. expected:<string with spaces> but was:<single_word>
->>> STDERR
-flags:FATAL the available getopt does not support spaces in options
->>> end output
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-
-Ran 13 tests.
-
-FAILED (failures=2,skipped=92)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testScreenColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
diff --git a/test_results/1.0.3/Linux-Ubuntu-6.06.txt b/test_results/1.0.3/Linux-Ubuntu-6.06.txt
deleted file mode 100644
index 0cf34d6..0000000
--- a/test_results/1.0.3/Linux-Ubuntu-6.06.txt
+++ /dev/null
@@ -1,348 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Fri Apr 24 01:17:02 IST 2009
-$ uname -mprsv
-Linux 2.6.18.5-gg38server-xenU-3.1 #1 SMP Fri Jul 18 13:02:34 IST 2008 x86_64 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.1.17(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28-r--$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.2.5
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
diff --git a/test_results/1.0.3/Linux-Ubuntu-8.04.txt b/test_results/1.0.3/Linux-Ubuntu-8.04.txt
deleted file mode 100644
index b180dd0..0000000
--- a/test_results/1.0.3/Linux-Ubuntu-8.04.txt
+++ /dev/null
@@ -1,409 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Apr 18 06:27:02 GMT 2009
-$ uname -mprsv
-Linux 2.6.24-23-server #1 SMP Wed Apr 1 22:22:14 UTC 2009 i686 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.39(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-shell name: dash
-shell version: 0.5.4-8ubuntu1.1
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
diff --git a/test_results/1.0.3/Mac_OS_X-10.5.6.txt b/test_results/1.0.3/Mac_OS_X-10.5.6.txt
deleted file mode 100644
index 148f6e7..0000000
--- a/test_results/1.0.3/Mac_OS_X-10.5.6.txt
+++ /dev/null
@@ -1,287 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Mon Apr 20 04:46:09 IST 2009
-$ uname -mprsv
-Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.17(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
diff --git a/test_results/1.0.3/Solaris-5.11-NexentaOS_20081207.txt b/test_results/1.0.3/Solaris-5.11-NexentaOS_20081207.txt
deleted file mode 100644
index 19b78d1..0000000
--- a/test_results/1.0.3/Solaris-5.11-NexentaOS_20081207.txt
+++ /dev/null
@@ -1,235 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Apr 25 13:21:10 IST 2009
-$ uname -mprsv
-SunOS 5.11 NexentaOS_20081207 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-ASSERT:failed str test expected:<two> but was:<>
-ASSERT:failed float test expected:<3> but was:<0.0>
-ASSERT:incorrect number of argv values expected:<3> but was:<6>
-
-Ran 16 tests.
-
-FAILED (failures=3,skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.33(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-ASSERT:failed str test expected:<two> but was:<>
-ASSERT:failed float test expected:<3> but was:<0.0>
-ASSERT:incorrect number of argv values expected:<3> but was:<6>
-
-Ran 16 tests.
-
-FAILED (failures=3,skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-ASSERT:failed str test expected:<two> but was:<>
-ASSERT:failed float test expected:<3> but was:<0.0>
-ASSERT:incorrect number of argv values expected:<3> but was:<6>
-
-Ran 16 tests.
-
-FAILED (failures=3,skipped=3)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=1)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
diff --git a/test_results/1.0.3/Solaris-5.11-snv_77.txt b/test_results/1.0.3/Solaris-5.11-snv_77.txt
deleted file mode 100644
index 79969fc..0000000
--- a/test_results/1.0.3/Solaris-5.11-snv_77.txt
+++ /dev/null
@@ -1,287 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sat Apr 25 12:20:26 GMT 2009
-$ uname -mprsv
-SunOS 5.11 snv_77 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.25(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-11/16/88i M-11/16/88i
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBooleanShort
-testValidBooleanLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK (skipped=104)
-
---- Executing the 'private' test suite ---
-testGetFlagInfo
-testItemInList
-testColumns
-testValidateBoolean
-testValidateFloat
-testValidateInteger
-
-Ran 6 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=6)
diff --git a/test_results/1.2.0/FreeBSD-9.1.txt b/test_results/1.2.0/FreeBSD-9.1.txt
deleted file mode 100644
index 9980680..0000000
--- a/test_results/1.2.0/FreeBSD-9.1.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 00:08:36 UTC 2013
-$ uname -mprsv
-FreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Fri Dec 7 20:50:48 GMT 2012 kirk@freenas:/usr/obj/usr/src/sys/GENERIC amd64 amd64
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
diff --git a/test_results/1.2.0/Linux-Ubuntu-10.04.4-LTS.txt b/test_results/1.2.0/Linux-Ubuntu-10.04.4-LTS.txt
deleted file mode 100644
index 4dc2fb5..0000000
--- a/test_results/1.2.0/Linux-Ubuntu-10.04.4-LTS.txt
+++ /dev/null
@@ -1,451 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 00:09:41 UTC 2013
-$ uname -mprsv
-Linux 2.6.32-45-server #101-Ubuntu SMP Mon Dec 3 15:54:27 UTC 2012 x86_64 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 4.1.5(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-shell name: dash
-shell version: 0.5.5.1-3ubuntu2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: JM-93t+-2009-05-01-$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.10
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
diff --git a/test_results/1.2.0/Linux-Ubuntu-12.04.1-LTS.txt b/test_results/1.2.0/Linux-Ubuntu-12.04.1-LTS.txt
deleted file mode 100644
index c3a2a0d..0000000
--- a/test_results/1.2.0/Linux-Ubuntu-12.04.1-LTS.txt
+++ /dev/null
@@ -1,451 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 00:09:47 GMT 2013
-$ uname -mprsv
-Linux 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 4.2.24(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-shell name: dash
-shell version: 0.5.7-2ubuntu2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: JM-93u-2011-02-08-$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.17
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
diff --git a/test_results/1.2.0/Linux-Ubuntu-14.04.3-LTS.txt b/test_results/1.2.0/Linux-Ubuntu-14.04.3-LTS.txt
deleted file mode 100644
index eb05518..0000000
--- a/test_results/1.2.0/Linux-Ubuntu-14.04.3-LTS.txt
+++ /dev/null
@@ -1,451 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sun Jan 10 19:09:28 CET 2016
-$ uname -mprsv
-Linux 4.2.0-22-generic #27~14.04.1-Ubuntu SMP Fri Dec 18 10:57:53 UTC 2015 x86_64 x86_64
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 4.3.11(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-shell name: dash
-shell version: 0.5.7-4ubuntu1
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: AJM-93u+-2012-08-01-$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 5.0.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
diff --git a/test_results/1.2.0/Linux-Ubuntu-8.04.4-LTS.txt b/test_results/1.2.0/Linux-Ubuntu-8.04.4-LTS.txt
deleted file mode 100644
index 62d42f8..0000000
--- a/test_results/1.2.0/Linux-Ubuntu-8.04.4-LTS.txt
+++ /dev/null
@@ -1,451 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Mon Jan 14 18:09:57 CST 2013
-$ uname -mprsv
-Linux 2.6.24-32-server #1 SMP Mon Dec 3 15:54:12 UTC 2012 x86_64 unknown
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.39(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-shell name: dash
-shell version: 0.5.4-8ubuntu1.1
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-1993-12-28
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-shell name: pdksh
-shell version: v5.2.14-99/07/13.2
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.4
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Enhanced version of getopt found. Standard tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=2)
diff --git a/test_results/1.2.0/Mac_OS_X-10.10.3.txt b/test_results/1.2.0/Mac_OS_X-10.10.3.txt
deleted file mode 100644
index e81ae0f..0000000
--- a/test_results/1.2.0/Mac_OS_X-10.10.3.txt
+++ /dev/null
@@ -1,315 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Sun Jan 10 19:09:43 CET 2016
-$ uname -mprsv
-Darwin 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:20:09 PST 2015; root:xnu-3248.30.4~2/RELEASE_X86_64 x86_64 i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.57(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: AJM-93u+-2012-08-01-$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 5.0.8
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
diff --git a/test_results/1.2.0/Mac_OS_X-10.8.2.txt b/test_results/1.2.0/Mac_OS_X-10.8.2.txt
deleted file mode 100644
index c03b407..0000000
--- a/test_results/1.2.0/Mac_OS_X-10.8.2.txt
+++ /dev/null
@@ -1,315 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 01:10:24 CET 2013
-$ uname -mprsv
-Darwin 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.48(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: JM-93u-2011-02-08-$
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.3.11
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
diff --git a/test_results/1.2.0/OpenSolaris-2009.06(snv_111b).txt b/test_results/1.2.0/OpenSolaris-2009.06(snv_111b).txt
deleted file mode 100644
index 250dd52..0000000
--- a/test_results/1.2.0/OpenSolaris-2009.06(snv_111b).txt
+++ /dev/null
@@ -1,247 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 00:08:39 GMT 2013
-$ uname -mprsv
-SunOS 5.11 snv_111b i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.25(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
diff --git a/test_results/1.2.0/Solaris-10u10.txt b/test_results/1.2.0/Solaris-10u10.txt
deleted file mode 100644
index ee3083b..0000000
--- a/test_results/1.2.0/Solaris-10u10.txt
+++ /dev/null
@@ -1,316 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 01:09:38 MET 2013
-$ uname -mprsv
-SunOS 5.10 Generic_147441-01 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-test:WARN Shell built-ins not supported. Some tests will be skipped.
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK (skipped=46)
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 3.2.51(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-11/16/88i
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 4.2.1
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
diff --git a/test_results/1.2.0/Solaris-8u7.txt b/test_results/1.2.0/Solaris-8u7.txt
deleted file mode 100644
index 754672c..0000000
--- a/test_results/1.2.0/Solaris-8u7.txt
+++ /dev/null
@@ -1,316 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 00:08:59 GMT 2013
-$ uname -mprsv
-SunOS 5.8 Generic_108529-13 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-test:WARN Shell built-ins not supported. Some tests will be skipped.
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK (skipped=46)
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 2.03.0(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-11/16/88i
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 3.0.6
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
diff --git a/test_results/1.2.0/Solaris-9u8.txt b/test_results/1.2.0/Solaris-9u8.txt
deleted file mode 100644
index 2ae38f4..0000000
--- a/test_results/1.2.0/Solaris-9u8.txt
+++ /dev/null
@@ -1,316 +0,0 @@
-#------------------------------------------------------------------------------
-# System data
-#
-
-# test run info
-shells="/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh"
-tests=" shflags_test_defines.sh shflags_test_parsing.sh shflags_test_private.sh shflags_test_public.sh"
-
-# system info
-$ date
-Tue Jan 15 00:09:36 GMT 2013
-$ uname -mprsv
-SunOS 5.9 Generic_118559-11 i86pc i386
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/sh
-#
-shell name: sh
-shell version: unknown
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-test:WARN Shell built-ins not supported. Some tests will be skipped.
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK (skipped=46)
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/bash
-#
-shell name: bash
-shell version: 2.05.0(1)-release
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/dash
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/ksh
-#
-shell name: ksh
-shell version: M-11/16/88i
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/pdksh
-#
-
-
-#------------------------------------------------------------------------------
-# Running the test suite with /bin/zsh
-#
-shell name: zsh
-shell version: 3.0.8
-
---- Executing the 'defines' test suite ---
-testFlagsDefine
-testBoolean
-testFloat
-testInteger
-testString
-testShortNameLength
-testFlagNameIsReserved
-
-Ran 7 tests.
-
-OK
-
---- Executing the 'parsing' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testGetoptStandard
-testGetoptEnhanced
-testValidBoolsShort
-testValidBoolsLong
-testValidFloats
-testInvalidFloats
-testValidIntegers
-testInvalidIntegers
-testValidStrings
-testMultipleFlags
-testSingleNonFlagArg
-testMultipleNonFlagArgs
-testMultipleNonFlagStringArgsWithSpaces
-testFlagsWithEquals
-testComplicatedCommandLineStandard
-testComplicatedCommandLineEnhanced
-
-Ran 16 tests.
-
-OK
-
---- Executing the 'private' test suite ---
-testColumns
-testGenOptStr
-testGetFlagInfo
-testItemInList
-testValidBool
-testValidFloatBuiltin
-testValidFloatExpr
-testValidIntBuiltin
-testValidIntExpr
-testMathBuiltin
-testMathExpr
-testStrlenBuiltin
-testStrlenExpr
-
-Ran 13 tests.
-
-OK
-
---- Executing the 'public' test suite ---
-test:WARN Standard version of getopt found. Enhanced tests will be skipped.
-testHelp
-testStandardHelpOutput
-testEnhancedHelpOutput
-testNoHelp
-
-Ran 4 tests.
-
-OK (skipped=5)
diff --git a/test_runner b/test_runner
new file mode 100755
index 0000000..e266ff4
--- /dev/null
+++ b/test_runner
@@ -0,0 +1,147 @@
+#! /bin/sh
+# vim:et:ft=sh:sts=2:sw=2
+#
+# Unit test suite runner.
+#
+# Copyright 2008-2017 Kate Ward. All Rights Reserved.
+# Released under the Apache 2.0 license.
+#
+# Author: kate.ward@forestent.com (Kate Ward)
+# https://github.com/kward/shlib
+#
+# This script runs all the unit tests that can be found, and generates a nice
+# report of the tests.
+#
+### ShellCheck (http://www.shellcheck.net/)
+# Disable source following.
+# shellcheck disable=SC1090,SC1091
+# expr may be antiquated, but it is the only solution in some cases.
+# shellcheck disable=SC2003
+
+BASENAME=$(basename "$0")
+SHELLS="${SHELLS:-/bin/sh ash /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh}"
+# shellcheck disable=SC2035
+TESTS=$(echo *_test.sh)
+
+runner_die() { [ $# -gt 0 ] && echo "$@" >&2; exit 1; }
+
+runner_usage() {
+ echo "usage: ${BASENAME} [-e key=val ...] [-s shell(s)] [-t test(s)]"
+}
+
+runner_warn() { echo "runner:WARN $*" >&2; }
+
+# Find versions library.
+for d in . ${LIB_DIR:-lib}; do
+ if [ -r "${d}/versions" ]; then
+ lib_dir="${d}"
+ break
+ fi
+done
+[ -n "${lib_dir}" ] || runner_die 'Unable to find versions library.'
+
+### Load libraries.
+. "${lib_dir}/versions" || runner_die 'Unable to load versions library.'
+
+env=''
+
+# Process command line flags.
+while getopts 'e:hs:t:' opt; do
+ case ${opt} in
+ e) # set an environment variable
+ key=$(expr "${OPTARG}" : '\([^=]*\)=')
+ val=$(expr "${OPTARG}" : '[^=]*=\(.*\)')
+ # shellcheck disable=SC2166
+ if [ -z "${key}" -o -z "${val}" ]; then
+ runner_usage
+ exit 1
+ fi
+ eval "${key}='${val}'"
+ eval "export ${key}"
+ env="${env:+${env} }${key}"
+ ;;
+ h) runner_usage; exit 0 ;; # help output
+ s) shells=${OPTARG} ;; # list of shells to run
+ t) tests=${OPTARG} ;; # list of tests to run
+ *) runner_usage; exit 1 ;;
+ esac
+done
+shift "$(expr ${OPTIND} - 1)"
+
+# Fill shells and/or tests.
+shells=${shells:-${SHELLS}}
+tests=${tests:-${TESTS}}
+
+# Error checking.
+if [ -z "${tests}" ]; then
+ th_error 'no tests found to run; exiting'
+ exit 1
+fi
+
+cat <<EOF
+#------------------------------------------------------------------------------
+# System data.
+#
+
+$ uname -mprsv
+$(uname -mprsv)
+
+OS Name: $(versions_osName)
+OS Version: $(versions_osVersion)
+
+### Test run info.
+shells: ${shells}
+tests: ${tests}
+EOF
+for key in ${env}; do
+ eval "echo \"${key}=\$${key}\""
+done
+
+# Run tests.
+for shell in ${shells}; do
+ echo
+
+ cat <<EOF
+
+#------------------------------------------------------------------------------
+# Running the test suite with ${shell}.
+#
+EOF
+
+ # Check for existence of shell.
+ shell_bin=${shell}
+ shell_name=''
+ shell_present=${FALSE}
+ case ${shell} in
+ ash)
+ shell_bin=$(which busybox)
+ [ $? -eq "${TRUE}" ] && shell_present="${TRUE}"
+ shell_bin="${shell_bin} ash"
+ shell_name=${shell}
+ ;;
+ *)
+ [ -x "${shell_bin}" ] && shell_present="${TRUE}"
+ shell_name=$(basename "${shell}")
+ ;;
+ esac
+ if [ "${shell_present}" -eq "${FALSE}" ]; then
+ runner_warn "unable to run tests with the ${shell_name} shell"
+ continue
+ fi
+
+ shell_version=$(versions_shellVersion "${shell}")
+
+ echo "shell name: ${shell_name}"
+ echo "shell version: ${shell_version}"
+
+ # Execute the tests.
+ for suite in ${tests}; do
+ # shellcheck disable=SC1117
+ suiteName=$(expr "${suite}" : "${TESTS_PREFIX}\(.*\).sh")
+ echo
+ echo "--- Executing the '${suiteName}' test suite. ---"
+ # ${shell_bin} needs word splitting.
+ # shellcheck disable=SC2086
+ ( exec ${shell_bin} "./${suite}" 2>&1; )
+ done
+done