Update for review comments.
This commit is contained in:
parent
87ac39c800
commit
7d99d6d10b
|
@ -26,8 +26,9 @@ crate. The `--test` flag will make the following changes:
|
||||||
* Links the executable with [`libtest`], the test harness that is part of the
|
* Links the executable with [`libtest`], the test harness that is part of the
|
||||||
standard library, which handles running the tests.
|
standard library, which handles running the tests.
|
||||||
* Synthesizes a [`main` function] which will process command-line arguments
|
* Synthesizes a [`main` function] which will process command-line arguments
|
||||||
and run the tests. If the crate already has a `main` function, it will be
|
and run the tests. This new `main` function will replace any existing `main`
|
||||||
replaced.
|
function as the entry point of the executable, though the existing `main`
|
||||||
|
will still be compiled.
|
||||||
* Enables the [`test` cfg option], which allows your code to use conditional
|
* Enables the [`test` cfg option], which allows your code to use conditional
|
||||||
compilation to detect if it is being built as a test.
|
compilation to detect if it is being built as a test.
|
||||||
* Enables building of functions annotated with the [`test`][attribute-test]
|
* Enables building of functions annotated with the [`test`][attribute-test]
|
||||||
|
@ -83,11 +84,11 @@ behavior.
|
||||||
|
|
||||||
### Filters
|
### Filters
|
||||||
|
|
||||||
Bare arguments (those without a `-` prefix) are treated as filters which will
|
Positional arguments (those without a `-` prefix) are treated as filters which
|
||||||
only run tests whose name matches one of those strings. The filter will match
|
will only run tests whose name matches one of those strings. The filter will
|
||||||
any substring found in the full path of the test function. For example, if the
|
match any substring found in the full path of the test function. For example,
|
||||||
test function `it_works` is located in the module `utils::paths::tests`, then
|
if the test function `it_works` is located in the module
|
||||||
any of the filters `works`, `path`, `utils::`, or
|
`utils::paths::tests`, then any of the filters `works`, `path`, `utils::`, or
|
||||||
`utils::paths::tests::it_works` will match that test.
|
`utils::paths::tests::it_works` will match that test.
|
||||||
|
|
||||||
See [Selection options](#selection-options) for more options to control which
|
See [Selection options](#selection-options) for more options to control which
|
||||||
|
@ -230,7 +231,7 @@ Controls the format of the output. Valid options:
|
||||||
|
|
||||||
#### `--logfile` _PATH_
|
#### `--logfile` _PATH_
|
||||||
|
|
||||||
Writes the results to the tests to the given file.
|
Writes the results of the tests to the given file.
|
||||||
|
|
||||||
#### `--report-time` _FORMAT_
|
#### `--report-time` _FORMAT_
|
||||||
|
|
||||||
|
@ -244,7 +245,7 @@ docs](../../unstable-book/compiler-flags/report-time.html) for more information.
|
||||||
Some CLI options are added in an "unstable" state, where they are intended for
|
Some CLI options are added in an "unstable" state, where they are intended for
|
||||||
experimentation and testing to determine if the option works correctly, has
|
experimentation and testing to determine if the option works correctly, has
|
||||||
the right design, and is useful. The option may not work correctly, break, or
|
the right design, and is useful. The option may not work correctly, break, or
|
||||||
change at at any time. To signal that you acknowledge that you are using an
|
change at any time. To signal that you acknowledge that you are using an
|
||||||
unstable option, they require passing the `-Z unstable-options` command-line
|
unstable option, they require passing the `-Z unstable-options` command-line
|
||||||
flag.
|
flag.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue