diff options
Diffstat (limited to 'src/tools/cargo/tests/testsuite/init/both_lib_and_bin/mod.rs')
-rw-r--r-- | src/tools/cargo/tests/testsuite/init/both_lib_and_bin/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/init/both_lib_and_bin/mod.rs b/src/tools/cargo/tests/testsuite/init/both_lib_and_bin/mod.rs new file mode 100644 index 000000000..c9232320a --- /dev/null +++ b/src/tools/cargo/tests/testsuite/init/both_lib_and_bin/mod.rs @@ -0,0 +1,19 @@ +use cargo_test_support::paths; +use cargo_test_support::prelude::*; + +use cargo_test_support::curr_dir; + +#[cargo_test] +fn case() { + let cwd = paths::root(); + + snapbox::cmd::Command::cargo_ui() + .arg_line("init --lib --bin") + .current_dir(&cwd) + .assert() + .code(101) + .stdout_matches_path(curr_dir!().join("stdout.log")) + .stderr_matches_path(curr_dir!().join("stderr.log")); + + assert!(!cwd.join("Cargo.toml").is_file()); +} |