WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 66fac81

Browse files
committed
test: add the with default registry configured case
1 parent 9735387 commit 66fac81

File tree

15 files changed

+138
-0
lines changed

15 files changed

+138
-0
lines changed

tests/testsuite/cargo_info/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ mod specify_version_within_ws_and_conflict_with_lockfile;
1717
mod specify_version_within_ws_and_match_with_lockfile;
1818
mod transitive_dependency_within_ws;
1919
mod verbose;
20+
mod with_default_registry_configured;
2021
mod with_frozen_outside_ws;
2122
mod with_frozen_within_ws;
2223
mod with_locked_outside_ws;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[registry]
2+
default = "crates-io"

tests/testsuite/cargo_info/with_default_registry_configured/in/Cargo.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
members = ["crates/*"]
3+
4+
[package]
5+
name = "foo"
6+
version = "0.0.0"
7+
8+
[dependencies]
9+
crate1 = { path = "./crates/crate1" }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[package]
2+
name = "crate1"
3+
version = "0.0.0"
4+
5+
[dependencies]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
use crate::prelude::*;
2+
use cargo_test_support::{Project, compare::assert_ui, current_dir, file};
3+
4+
use super::init_registry_without_token;
5+
6+
#[cargo_test]
7+
fn case() {
8+
init_registry_without_token();
9+
10+
let project = Project::from_template(current_dir!().join("in"));
11+
let project_root = project.root();
12+
let cwd = &project_root;
13+
14+
snapbox::cmd::Command::cargo_ui()
15+
.arg("info")
16+
.arg_line("--verbose foo")
17+
.current_dir(cwd)
18+
.assert()
19+
.failure()
20+
.stdout_eq(file!["stdout.term.svg"])
21+
.stderr_eq(file!["stderr.term.svg"]);
22+
23+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
24+
}

tests/testsuite/cargo_info/with_default_registry_configured/out/Cargo.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
members = ["crates/*"]
3+
4+
[package]
5+
name = "foo"
6+
version = "0.0.0"
7+
8+
[dependencies]
9+
crate1 = { path = "./crates/crate1" }

0 commit comments

Comments
 (0)