diff --git a/guide/src/cli/test.md b/guide/src/cli/test.md index c13e8809..e134dc9b 100644 --- a/guide/src/cli/test.md +++ b/guide/src/cli/test.md @@ -43,7 +43,17 @@ mdbook test path/to/book The `--library-path` (`-L`) option allows you to add directories to the library search path used by `rustdoc` when it builds and tests the examples. Multiple directories can be specified with multiple options (`-L foo -L bar`) or with a -comma-delimited list (`-L foo,bar`). +comma-delimited list (`-L foo,bar`). The path should point to the Cargo +[build cache](https://doc.rust-lang.org/cargo/guide/build-cache.html) `deps` directory that +contains the build output of your project. For example, if your Rust project's book is in a directory +named `my-book`, the following command would include the crate's dependencies when running `test`: + +```shell +mdbook test my-book -L target/debug/deps/ +``` + +See the `rustdoc` command-line [documentation](https://doc.rust-lang.org/rustdoc/command-line-arguments.html#-l--library-path-where-to-look-for-dependencies) +for more information. #### --dest-dir