]> git.proxmox.com Git - cargo.git/blame - tests/testsuite/cargo_add/invalid_path_name/mod.rs
Update upstream source from tag 'upstream/0.66.0'
[cargo.git] / tests / testsuite / cargo_add / invalid_path_name / mod.rs
CommitLineData
cbd4edb2 1use cargo_test_support::compare::assert_ui;
92fbc4e3
SS
2use cargo_test_support::prelude::*;
3use cargo_test_support::Project;
4
5use crate::cargo_add::init_registry;
6use cargo_test_support::curr_dir;
7
8#[cargo_test]
9fn invalid_path_name() {
10 init_registry();
11 let project = Project::from_template(curr_dir!().join("in"));
12 let project_root = project.root();
13 let cwd = project_root.join("primary");
14
cbd4edb2 15 snapbox::cmd::Command::cargo_ui()
92fbc4e3
SS
16 .arg("add")
17 .arg_line("not-at-path --path ../dependency")
18 .current_dir(&cwd)
19 .assert()
20 .code(101)
21 .stdout_matches_path(curr_dir!().join("stdout.log"))
22 .stderr_matches_path(curr_dir!().join("stderr.log"));
23
cbd4edb2 24 assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
92fbc4e3 25}