diff options
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item')
6 files changed, 54 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/in/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/in/Cargo.toml new file mode 100644 index 000000000..19aa939d9 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/in/Cargo.toml @@ -0,0 +1,13 @@ +[workspace] + +[package] +name = "cargo-list-test-fixture" +version = "0.0.0" + +[dependencies] +toml = "0.1.1" +versioned-package = "0.1.1" + +[dependencies.my-build-package1] +version = "0.1.1" + diff --git a/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/in/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/in/src/lib.rs new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/in/src/lib.rs diff --git a/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs new file mode 100644 index 000000000..55e4c2281 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs @@ -0,0 +1,25 @@ +use cargo_test_support::compare::assert_ui; +use cargo_test_support::prelude::*; +use cargo_test_support::Project; + +use crate::cargo_add::init_registry; +use cargo_test_support::curr_dir; + +#[cargo_test] +fn case() { + init_registry(); + let project = Project::from_template(curr_dir!().join("in")); + let project_root = project.root(); + let cwd = &project_root; + + snapbox::cmd::Command::cargo_ui() + .arg("add") + .arg_line("unrelateed-crate") + .current_dir(cwd) + .assert() + .success() + .stdout_matches_path(curr_dir!().join("stdout.log")) + .stderr_matches_path(curr_dir!().join("stderr.log")); + + assert_ui().subset_matches(curr_dir!().join("out"), &project_root); +} diff --git a/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/out/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/out/Cargo.toml new file mode 100644 index 000000000..008ff4f62 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/out/Cargo.toml @@ -0,0 +1,14 @@ +[workspace] + +[package] +name = "cargo-list-test-fixture" +version = "0.0.0" + +[dependencies] +toml = "0.1.1" +unrelateed-crate = "99999.0.0" +versioned-package = "0.1.1" + +[dependencies.my-build-package1] +version = "0.1.1" + diff --git a/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/stderr.log b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/stderr.log new file mode 100644 index 000000000..be1db1c4d --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/stderr.log @@ -0,0 +1,2 @@ + Updating `dummy-registry` index + Adding unrelateed-crate v99999.0.0 to dependencies. diff --git a/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/stdout.log b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/stdout.log new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/sorted_table_with_dotted_item/stdout.log |