Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #104 from hi-rustin/renovate/snapbox-0.x
Browse files Browse the repository at this point in the history
chore(deps): update rust crate snapbox to 0.5.1
  • Loading branch information
Rustin170506 committed Feb 17, 2024
2 parents bf4c9fe + 0a27df8 commit f3bab68
Show file tree
Hide file tree
Showing 27 changed files with 142 additions and 159 deletions.
102 changes: 42 additions & 60 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ semver = "1.0.21"
[dev-dependencies]
cargo-test-macro = { git = "https://github.com/rust-lang/cargo.git" }
cargo-test-support = { git = "https://github.com/rust-lang/cargo.git" }
snapbox = "0.4.16"
snapbox = "0.5.0"
trycmd = "0.15.0"

[[bin]]
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/cargo_information/basic/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cargo_test_macro::cargo_test;
use cargo_test_support::curr_dir;
use cargo_test_support::file;

use super::{cargo_info, init_registry_without_token};

Expand Down Expand Up @@ -46,6 +46,6 @@ fn case() {
.arg("--registry=dummy-registry")
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_matches(file!["stdout.log"])
.stderr_matches(file!["stderr.log"]);
}
6 changes: 3 additions & 3 deletions tests/testsuite/cargo_information/features/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cargo_test_macro::cargo_test;
use cargo_test_support::curr_dir;
use cargo_test_support::file;

use super::{cargo_info, init_registry_without_token};

Expand All @@ -17,6 +17,6 @@ fn case() {
.arg("--registry=dummy-registry")
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_matches(file!["stdout.log"])
.stderr_matches(file!["stderr.log"]);
}
6 changes: 3 additions & 3 deletions tests/testsuite/cargo_information/git_dependency/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cargo_test_macro::cargo_test;
use cargo_test_support::{basic_manifest, curr_dir, git, project};
use cargo_test_support::{basic_manifest, file, git, project};

use super::{cargo_info, init_registry_without_token};

Expand Down Expand Up @@ -38,6 +38,6 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_matches(file!["stdout.log"])
.stderr_matches(file!["stderr.log"]);
}
6 changes: 3 additions & 3 deletions tests/testsuite/cargo_information/help/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cargo_test_macro::cargo_test;
use cargo_test_support::curr_dir;
use cargo_test_support::file;

use super::cargo_info;

Expand All @@ -10,6 +10,6 @@ fn case() {
.arg("--registry=dummy-registry")
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_matches(file!["stdout.log"])
.stderr_matches(file!["stderr.log"]);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_information/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cargo_test_support::{compare, TestEnv};
use cargo_test_support::{compare::assert_ui, TestEnv};

mod basic;
mod features;
Expand Down Expand Up @@ -28,7 +28,7 @@ mod within_ws_without_lockfile;
// Invoke `cargo-info info` with the test environment.
pub(crate) fn cargo_info() -> snapbox::cmd::Command {
snapbox::cmd::Command::new(snapbox::cmd::cargo_bin("cargo-info"))
.with_assert(compare::assert_ui())
.with_assert(assert_ui())
.test_env()
.arg("info")
.arg("--color=never")
Expand Down
10 changes: 5 additions & 5 deletions tests/testsuite/cargo_information/not_found/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use cargo_test_macro::cargo_test;
use cargo_test_support::{compare::assert_ui, curr_dir, Project};
use cargo_test_support::{compare::assert_ui, current_dir, file, Project};

use super::{cargo_info, init_registry_without_token};

#[cargo_test]
fn case() {
init_registry_without_token();
let project = Project::from_template(curr_dir!().join("in"));
let project = Project::from_template(current_dir!().join("in"));
let project_root = project.root();
let cwd = &project_root;

Expand All @@ -16,8 +16,8 @@ fn case() {
.current_dir(cwd)
.assert()
.failure()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_matches(file!["stdout.log"])
.stderr_matches(file!["stderr.log"]);

assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Loading

0 comments on commit f3bab68

Please sign in to comment.