diff options
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_new')
4 files changed, 45 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_new/help/mod.rs b/src/tools/cargo/tests/testsuite/cargo_new/help/mod.rs new file mode 100644 index 000000000..6a1721deb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_new/help/mod.rs @@ -0,0 +1,13 @@ +use cargo_test_support::curr_dir; +use cargo_test_support::prelude::*; + +#[cargo_test] +fn case() { + snapbox::cmd::Command::cargo_ui() + .arg("new") + .arg("--help") + .assert() + .success() + .stdout_matches_path(curr_dir!().join("stdout.log")) + .stderr_matches_path(curr_dir!().join("stderr.log")); +} diff --git a/src/tools/cargo/tests/testsuite/cargo_new/help/stderr.log b/src/tools/cargo/tests/testsuite/cargo_new/help/stderr.log new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_new/help/stderr.log diff --git a/src/tools/cargo/tests/testsuite/cargo_new/help/stdout.log b/src/tools/cargo/tests/testsuite/cargo_new/help/stdout.log new file mode 100644 index 000000000..7252e0da1 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_new/help/stdout.log @@ -0,0 +1,31 @@ +Create a new cargo package at <path> + +Usage: cargo[EXE] new [OPTIONS] <path> + +Arguments: + <path> + +Options: + --vcs <VCS> Initialize a new repository for the given version control system (git, + hg, pijul, or fossil) or do not initialize any version control at all + (none), overriding a global configuration. [possible values: git, hg, + pijul, fossil, none] + --bin Use a binary (application) template [default] + --lib Use a library template + --edition <YEAR> Edition to set for the crate generated [possible values: 2015, 2018, + 2021] + --name <NAME> Set the resulting package name, defaults to the directory name + --registry <REGISTRY> Registry to use + -q, --quiet Do not print cargo log messages + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color <WHEN> Coloring: auto, always, never + --config <KEY=VALUE> Override a configuration value + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details + -h, --help Print help + +Manifest Options: + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + +Run `cargo help new` for more detailed information. diff --git a/src/tools/cargo/tests/testsuite/cargo_new/mod.rs b/src/tools/cargo/tests/testsuite/cargo_new/mod.rs index e895cf883..887316395 100644 --- a/src/tools/cargo/tests/testsuite/cargo_new/mod.rs +++ b/src/tools/cargo/tests/testsuite/cargo_new/mod.rs @@ -1,3 +1,4 @@ +mod help; mod inherit_workspace_lints; mod inherit_workspace_package_table; mod inherit_workspace_package_table_with_edition; |