]>
Commit | Line | Data |
---|---|---|
92fbc4e3 SS |
1 | use cargo_test_support::compare::assert; |
2 | use cargo_test_support::prelude::*; | |
3 | use cargo_test_support::Project; | |
4 | ||
5 | use crate::cargo_add::init_registry; | |
6 | use cargo_test_support::curr_dir; | |
7 | ||
8 | #[cargo_test] | |
9 | fn overwrite_features() { | |
10 | init_registry(); | |
11 | let project = Project::from_template(curr_dir!().join("in")); | |
12 | let project_root = project.root(); | |
13 | let cwd = &project_root; | |
14 | ||
15 | snapbox::cmd::Command::cargo() | |
16 | .arg("add") | |
17 | .arg_line("your-face --features nose") | |
18 | .current_dir(cwd) | |
19 | .assert() | |
20 | .success() | |
21 | .stdout_matches_path(curr_dir!().join("stdout.log")) | |
22 | .stderr_matches_path(curr_dir!().join("stderr.log")); | |
23 | ||
24 | assert().subset_matches(curr_dir!().join("out"), &project_root); | |
25 | } |