| test_description='test git rev-parse --parseopt' |
| usage: some-command [options] <args>... |
| some-command does foo and bar! |
| --foo some nifty option --foo |
| --bar ... some cool option --bar with an argument |
| -C[...] option C with an optional argument |
| --extra1 line above used to cause a segfault but no longer does |
| test_expect_success 'test --parseopt help output' ' |
| git rev-parse --parseopt -- -h 2> output.err <<EOF |
| some-command [options] <args>... |
| some-command does foo and bar! |
| foo some nifty option --foo |
| bar= some cool option --bar with an argument |
| C? option C with an optional argument |
| extra1 line above used to cause a segfault but no longer does |
| test_cmp expect.err output.err |