Skip to content

Commit ac86dea

Browse files
committed
test(add): Added test case for prefixed v in version
1 parent 7e09951 commit ac86dea

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

tests/testsuite/cargo_add/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ mod path_base_unstable;
126126
mod path_dev;
127127
mod path_inferred_name;
128128
mod path_inferred_name_conflicts_full_feature;
129+
mod prefixed_v_in_version;
129130
mod preserve_dep_std_table;
130131
mod preserve_features_sorted;
131132
mod preserve_features_table;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../add-basic.in
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::current_dir;
3+
use cargo_test_support::file;
4+
use cargo_test_support::prelude::*;
5+
use cargo_test_support::str;
6+
use cargo_test_support::Project;
7+
8+
#[cargo_test]
9+
fn case() {
10+
cargo_test_support::registry::init();
11+
12+
let project = Project::from_template(current_dir!().join("in"));
13+
let project_root = project.root();
14+
let cwd = &project_root;
15+
16+
snapbox::cmd::Command::cargo_ui()
17+
.arg("add")
18+
.arg_line("[email protected]")
19+
.current_dir(cwd)
20+
.assert()
21+
.code(101)
22+
.stdout_eq(str![""])
23+
.stderr_eq(file!["stderr.term.svg"]);
24+
25+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
26+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[workspace]
2+
3+
[package]
4+
name = "cargo-list-test-fixture"
5+
version = "0.0.0"
6+
edition = "2015"
Lines changed: 33 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)