From: Tom Grennan Date: Thu, 01 Mar 2012 01:45:20 GMT Subject: [PATCH 4/5] t0040 (parse-options): modernize style Message-ID: <1330566326-26075-5-git-send-email-tmgrennan@gmail.com> In-Reply-To: <1330566326-26075-1-git-send-email-tmgrennan@gmail.com> - Guard setup with test_expect_success - Single-quoted, tab prefaced test blocks of < 80 cols - Redirect unwanted output Signed-off-by: Tom Grennan --- t/t0040-parse-options.sh | 519 ++++++++++++++++++++++------------------------ 1 files changed, 245 insertions(+), 274 deletions(-) diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index a1e4616..6416d77 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -5,353 +5,324 @@ test_description='our own option parser' +if ! test -r test-lib.sh ; then + (cd ${0%/*} && ./${0##*/} $@) + exit $? +fi + . ./test-lib.sh -cat > expect << EOF -usage: test-parse-options - - -b, --boolean get a boolean - -4, --or4 bitwise-or boolean with ...0100 - --neg-or4 same as --no-or4 - - -i, --integer get a integer - -j get a integer, too - --set23 set integer to 23 - -t