]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #99100 - Smittyvb:test-cli-binary-name, r=thomcc
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 10 Jul 2022 09:52:16 +0000 (11:52 +0200)
committerGitHub <noreply@github.com>
Sun, 10 Jul 2022 09:52:16 +0000 (11:52 +0200)
commit76f968dadc75feb5580217a83d382ddb9ea15a8f
tree80976dceb68244e536c1addb245d898caa41283b
parentca51d325e8656d8bba1811f7bea6b2d82d87fb1c
parented542df9bc798bbdfe4d18308b9a6528bebf0461
Rollup merge of #99100 - Smittyvb:test-cli-binary-name, r=thomcc

Fix binary name in help message for test binaries

Currently the help output for a test binary uses the first argument instead of the binary name in the help output:

```
$ cargo test -- --help
...
Usage: --help [OPTIONS] [FILTERS...]
...
```

This fixes it to use the name of the binary (or `...` if there is no binary name passed on argv):

```
$ cargo test -- --help
...
Usage: /tmp/x/target/debug/deps/x-80c11a15ad4e1bf3 [OPTIONS] [FILTERS...]
...
```