diff options
author | kate.ward <kate.ward@forestent.com> | 2013-01-01 22:08:05 +0000 |
---|---|---|
committer | kate.ward <kate.ward@forestent.com> | 2013-01-01 22:08:05 +0000 |
commit | 1ee8856fd058f0cfade67d0613296e4358cf4fc1 (patch) | |
tree | 8a23e2df46ea0cf9962e1bd61527306af2cbdd57 /source | |
parent | 4eb31357b818b6f0779dc5e3018035f9d66e0f28 (diff) | |
download | shflags-1ee8856fd058f0cfade67d0613296e4358cf4fc1.tar.gz |
added mock_flags_columns to fix testStandardHelpOutput() method for screens >80 columns
Diffstat (limited to 'source')
-rwxr-xr-x | source/1.0/src/shflags_test_public.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/1.0/src/shflags_test_public.sh b/source/1.0/src/shflags_test_public.sh index 5077862..0da9d02 100755 --- a/source/1.0/src/shflags_test_public.sh +++ b/source/1.0/src/shflags_test_public.sh @@ -67,6 +67,11 @@ testHelp() ${grepped} } +mock_flags_columns() +{ + echo 80 +} + testStandardHelpOutput() { flags_getoptIsStd || startSkipping @@ -93,7 +98,11 @@ flags: (default: 'this_is_a_long_default_value_to_force_alternate_indentation') -h show this help (default: false) EOF - ( FLAGS_HELP=${help}; FLAGS -h >"${stdoutF}" 2>"${stderrF}" ) + ( + _flags_columns() { mock_flags_columns "$@"; } + 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 |