Skip to content

Commit fa08d67

Browse files
committed
docs(cargo-test): clarify the cwd is for running tests
1 parent c4312a4 commit fa08d67

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

src/doc/man/cargo-test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ on writing doc tests.
5959

6060
### Working directory of tests
6161

62-
The working directory of every test is set to the root directory of the package
63-
the test belongs to.
64-
Setting the working directory of tests to the package's root directory makes it
62+
The working directory when running each unit and integration test is set to the
63+
root directory of the package the test belongs to.
64+
Setting the working directory of tests to the package's root directory makes it
6565
possible for tests to reliably access the package's files using relative paths,
6666
regardless from where `cargo test` was executed from.
6767

src/doc/man/generated_txt/cargo-test.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ DESCRIPTION
5353
information on writing doc tests.
5454

5555
Working directory of tests
56-
The working directory of every test is set to the root directory of the
57-
package the test belongs to. Setting the working directory of tests to
58-
the package’s root directory makes it possible for tests to reliably
59-
access the package’s files using relative paths, regardless from where
60-
cargo test was executed from.
56+
The working directory when running each unit and integration test is set
57+
to the root directory of the package the test belongs to. Setting the
58+
working directory of tests to the package’s root directory makes it
59+
possible for tests to reliably access the package’s files using
60+
relative paths, regardless from where cargo test was executed from.
6161

6262
For documentation tests, the working directory when invoking rustdoc is
6363
set to the workspace root directory, and is also the directory rustdoc
@@ -480,4 +480,3 @@ SEE ALSO
480480
cargo(1), cargo-bench(1), types of tests
481481
<https://doc.rust-lang.org/cargo/reference/cargo-targets.html#tests>,
482482
how to write tests <https://doc.rust-lang.org/rustc/tests/index.html>
483-

src/doc/src/commands/cargo-test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ on writing doc tests.
5959

6060
### Working directory of tests
6161

62-
The working directory of every test is set to the root directory of the package
63-
the test belongs to.
64-
Setting the working directory of tests to the package's root directory makes it
62+
The working directory when running each unit and integration test is set to the
63+
root directory of the package the test belongs to.
64+
Setting the working directory of tests to the package's root directory makes it
6565
possible for tests to reliably access the package's files using relative paths,
6666
regardless from where `cargo test` was executed from.
6767

src/etc/man/cargo-test.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ and may change in the future; beware of depending on it.
5454
See the \fIrustdoc book\fR <https://doc.rust\-lang.org/rustdoc/> for more information
5555
on writing doc tests.
5656
.SS "Working directory of tests"
57-
The working directory of every test is set to the root directory of the package
58-
the test belongs to.
59-
Setting the working directory of tests to the package\[cq]s root directory makes it
57+
The working directory when running each unit and integration test is set to the
58+
root directory of the package the test belongs to.
59+
Setting the working directory of tests to the package\[cq]s root directory makes it
6060
possible for tests to reliably access the package\[cq]s files using relative paths,
6161
regardless from where \fBcargo test\fR was executed from.
6262
.sp

0 commit comments

Comments
 (0)