From 7dc7518edd3ccaf1fbb2ccf52b15ee91e5cc5127 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 7 Nov 2014 13:40:36 -0800 Subject: [PATCH] Clarify the documentation on `cargo test` Closes #812 --- src/bin/test.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/test.rs b/src/bin/test.rs index b1261a6dd82..d54100b6e65 100644 --- a/src/bin/test.rs +++ b/src/bin/test.rs @@ -27,7 +27,7 @@ Usage: Options: -h, --help Print this message - --name NAME Name of the test to run + --name NAME Name of the test executable to run --no-run Compile, but don't run tests -p SPEC, --package SPEC Package to run tests for -j N, --jobs N The number of jobs to run in parallel @@ -38,7 +38,10 @@ Options: -v, --verbose Use verbose output All of the trailing arguments are passed to the test binaries generated for -filtering tests and generally providing options configuring how they run. +filtering tests and generally providing options configuring how they run. For +example, this will run all tests with the name `foo` in their name: + + cargo test foo If the --package argument is given, then SPEC is a package id specification which indicates which package should be tested. If it is not given, then the