-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #14430 - Rustin170506:rustin-patch-14409, r=epage
test: add a regression test for Issue 14409
- Loading branch information
Showing
12 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/testsuite/cargo_info/without_requiring_registry_auth/in/.cargo/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[registry] | ||
global-credential-providers = ["false"] |
16 changes: 16 additions & 0 deletions
16
tests/testsuite/cargo_info/without_requiring_registry_auth/in/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/testsuite/cargo_info/without_requiring_registry_auth/in/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[workspace] | ||
|
||
[package] | ||
name = "cargo-list-test-fixture" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
my-package = "0.1" |
Empty file.
26 changes: 26 additions & 0 deletions
26
tests/testsuite/cargo_info/without_requiring_registry_auth/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use cargo_test_support::prelude::*; | ||
use cargo_test_support::{compare::assert_ui, current_dir, file, Project}; | ||
|
||
use super::init_registry_without_token; | ||
|
||
#[cargo_test] | ||
fn case() { | ||
init_registry_without_token(); | ||
cargo_test_support::registry::Package::new("my-package", "0.1.1+my-package").publish(); | ||
|
||
let project = Project::from_template(current_dir!().join("in")); | ||
let project_root = project.root(); | ||
let cwd = &project_root; | ||
|
||
snapbox::cmd::Command::cargo_ui() | ||
.arg("info") | ||
.arg("my-package") | ||
.arg("--registry=dummy-registry") | ||
.current_dir(cwd) | ||
.assert() | ||
.success() | ||
.stdout_eq(file!["stdout.term.svg"]) | ||
.stderr_eq(file!["stderr.term.svg"]); | ||
|
||
assert_ui().subset_matches(current_dir!().join("out"), &project_root); | ||
} |
2 changes: 2 additions & 0 deletions
2
tests/testsuite/cargo_info/without_requiring_registry_auth/out/.cargo/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[registry] | ||
global-credential-providers = ["false"] |
16 changes: 16 additions & 0 deletions
16
tests/testsuite/cargo_info/without_requiring_registry_auth/out/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/testsuite/cargo_info/without_requiring_registry_auth/out/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[workspace] | ||
|
||
[package] | ||
name = "cargo-list-test-fixture" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
my-package = "0.1" |
Empty file.
31 changes: 31 additions & 0 deletions
31
tests/testsuite/cargo_info/without_requiring_registry_auth/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions
42
tests/testsuite/cargo_info/without_requiring_registry_auth/stdout.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.