t0040-test-parse-options.sh: fix style issues
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
7b0d47b3b6
commit
8425b7ea6a
@ -7,7 +7,7 @@ test_description='our own option parser'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
cat > expect << EOF
|
||||
cat >expect <<\EOF
|
||||
usage: test-parse-options <options>
|
||||
|
||||
--yes get a boolean
|
||||
@ -56,7 +56,7 @@ test_expect_success 'test help' '
|
||||
|
||||
mv expect expect.err
|
||||
|
||||
cat >expect.template <<EOF
|
||||
cat >expect.template <<\EOF
|
||||
boolean: 0
|
||||
integer: 0
|
||||
magnitude: 0
|
||||
@ -156,7 +156,7 @@ test_expect_success 'OPT_MAGNITUDE() 3giga' '
|
||||
check magnitude: 3221225472 -m 3g
|
||||
'
|
||||
|
||||
cat > expect << EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 2
|
||||
integer: 1729
|
||||
magnitude: 16384
|
||||
@ -176,7 +176,7 @@ test_expect_success 'short options' '
|
||||
test_must_be_empty output.err
|
||||
'
|
||||
|
||||
cat > expect << EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 2
|
||||
integer: 1729
|
||||
magnitude: 16384
|
||||
@ -204,7 +204,7 @@ test_expect_success 'missing required value' '
|
||||
test_expect_code 129 test-parse-options --file
|
||||
'
|
||||
|
||||
cat > expect << EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 1
|
||||
integer: 13
|
||||
magnitude: 0
|
||||
@ -227,7 +227,7 @@ test_expect_success 'intermingled arguments' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > expect << EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 0
|
||||
integer: 2
|
||||
magnitude: 0
|
||||
@ -256,7 +256,7 @@ test_expect_success 'ambiguously abbreviated option' '
|
||||
test_expect_code 129 test-parse-options --strin 123
|
||||
'
|
||||
|
||||
cat > expect << EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 0
|
||||
integer: 0
|
||||
magnitude: 0
|
||||
@ -275,8 +275,8 @@ test_expect_success 'non ambiguous option (after two options it abbreviates)' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > typo.err << EOF
|
||||
error: did you mean \`--boolean\` (with two dashes ?)
|
||||
cat >typo.err <<\EOF
|
||||
error: did you mean `--boolean` (with two dashes ?)
|
||||
EOF
|
||||
|
||||
test_expect_success 'detect possible typos' '
|
||||
@ -285,8 +285,8 @@ test_expect_success 'detect possible typos' '
|
||||
test_cmp typo.err output.err
|
||||
'
|
||||
|
||||
cat > typo.err << EOF
|
||||
error: did you mean \`--ambiguous\` (with two dashes ?)
|
||||
cat >typo.err <<\EOF
|
||||
error: did you mean `--ambiguous` (with two dashes ?)
|
||||
EOF
|
||||
|
||||
test_expect_success 'detect possible typos' '
|
||||
@ -295,7 +295,7 @@ test_expect_success 'detect possible typos' '
|
||||
test_cmp typo.err output.err
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 0
|
||||
integer: 0
|
||||
magnitude: 0
|
||||
@ -315,7 +315,7 @@ test_expect_success 'keep some options as arguments' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 0
|
||||
integer: 0
|
||||
magnitude: 0
|
||||
@ -336,7 +336,7 @@ test_expect_success 'OPT_DATE() works' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
Callback: "four", 0
|
||||
boolean: 5
|
||||
integer: 4
|
||||
@ -356,7 +356,7 @@ test_expect_success 'OPT_CALLBACK() and OPT_BIT() work' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
Callback: "not set", 1
|
||||
EOF
|
||||
|
||||
@ -366,7 +366,7 @@ test_expect_success 'OPT_CALLBACK() and callback errors work' '
|
||||
test_i18ncmp expect.err output.err
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 1
|
||||
integer: 23
|
||||
magnitude: 0
|
||||
@ -391,7 +391,7 @@ test_expect_success 'OPT_NEGBIT() and OPT_SET_INT() work' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 6
|
||||
integer: 0
|
||||
magnitude: 0
|
||||
@ -422,7 +422,7 @@ test_expect_success 'OPT_COUNTUP() with PARSE_OPT_NODASH works' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 0
|
||||
integer: 12345
|
||||
magnitude: 0
|
||||
@ -441,7 +441,7 @@ test_expect_success 'OPT_NUMBER_CALLBACK() works' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat >expect <<EOF
|
||||
cat >expect <<\EOF
|
||||
boolean: 0
|
||||
integer: 0
|
||||
magnitude: 0
|
||||
@ -460,7 +460,7 @@ test_expect_success 'negation of OPT_NONEG flags is not ambiguous' '
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
cat >>expect <<'EOF'
|
||||
cat >>expect <<\EOF
|
||||
list: foo
|
||||
list: bar
|
||||
list: baz
|
||||
|
Reference in New Issue
Block a user