3 test_description
='test git rev-parse --parseopt'
7 usage: some-command [options] <args>...
9 some-command does foo and bar!
11 -h, --help show the help
12 --foo some nifty option --foo
13 --bar ... some cool option --bar with an argument
15 An option group Header
16 -C [...] option C with an optional argument
19 --extra1 line above used to cause a segfault but no longer does
23 test_expect_success
'test --parseopt help output' '
24 git rev-parse --parseopt -- -h 2> output.err <<EOF
25 some-command [options] <args>...
27 some-command does foo and bar!
31 foo some nifty option --foo
32 bar= some cool option --bar with an argument
34 An option group Header
35 C? option C with an optional argument
38 extra1 line above used to cause a segfault but no longer does
40 test_cmp expect.err output.err