Skip to content

Commit 7dc7b1b

Browse files
committed
Add two tests to make sure fixup
1 parent e7ff7a6 commit 7dc7b1b

File tree

21 files changed

+121
-0
lines changed

21 files changed

+121
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[source.crates-io]
2+
replace-with = "vendored-sources"
3+
4+
[source.vendored-sources]
5+
directory = "./vendor"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[workspace]
2+
3+
[package]
4+
name = "cargo-list-test-fixture"
5+
version = "0.0.0"

tests/testsuite/cargo_add/add_no_vendored_package_with_alter_registry/in/src/lib.rs

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"files":{}}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[workspace]
2+
3+
[package]
4+
name = "aa"
5+
version = "0.0.0"

tests/testsuite/cargo_add/add_no_vendored_package_with_alter_registry/in/vendor/aa/src/lib.rs

Whitespace-only changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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::Project;
6+
7+
#[cargo_test]
8+
fn case() {
9+
cargo_test_support::registry::alt_init();
10+
cargo_test_support::registry::Package::new("linked-hash-map", "0.5.4")
11+
.feature("clippy", &[])
12+
.feature("heapsize", &[])
13+
.feature("heapsize_impl", &[])
14+
.feature("nightly", &[])
15+
.feature("serde", &[])
16+
.feature("serde_impl", &[])
17+
.feature("serde_test", &[])
18+
.alternative(true)
19+
.publish();
20+
21+
let project = Project::from_template(current_dir!().join("in"));
22+
let project_root = project.root();
23+
let cwd = &project_root;
24+
25+
snapbox::cmd::Command::cargo_ui()
26+
.arg("add")
27+
.arg_line("linked_hash_map --registry alternative")
28+
.current_dir(cwd)
29+
.assert()
30+
.success()
31+
.stdout_matches(file!["stdout.log"])
32+
.stderr_matches(file!["stderr.log"]);
33+
34+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
35+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[workspace]
2+
3+
[package]
4+
name = "cargo-list-test-fixture"
5+
version = "0.0.0"
6+
7+
[dependencies]
8+
linked-hash-map = { version = "0.5.4", registry = "alternative" }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Updating `alternative` index
2+
warning: translating `linked_hash_map` to `linked-hash-map`
3+
Adding linked-hash-map v0.5.4 to dependencies
4+
Features:
5+
- clippy
6+
- heapsize
7+
- heapsize_impl
8+
- nightly
9+
- serde
10+
- serde_impl
11+
- serde_test

tests/testsuite/cargo_add/add_no_vendored_package_with_alter_registry/stdout.log

Whitespace-only changes.

0 commit comments

Comments
 (0)