Skip to content

Commit 0d0cdb4

Browse files
committed
chore: Upgrade cargo-test-support
1 parent ce36ff5 commit 0d0cdb4

File tree

263 files changed

+3735
-923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+3735
-923
lines changed

Cargo.lock

+300-204
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ predicates = { version = "3.0.3", features = ["color"] }
9292
assert_cmd = { version = "2.0.12", features = ["color-auto"] }
9393
assert_fs = { version = "1.0.13", features = ["color-auto"] }
9494
trycmd = "0.14.17"
95-
snapbox = { version = "0.4.12", features = ["cmd", "path"] }
96-
cargo-test-macro.git = "https://github.com/rust-lang/cargo"
97-
cargo-test-support.git = "https://github.com/rust-lang/cargo"
95+
snapbox = { version = "0.6.9", features = ["cmd", "path"] }
96+
cargo-test-macro = "0.3"
97+
cargo-test-support = "0.3"
9898
url = "2.4.0"
9999

100100
[features]
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::file;
23
use cargo_test_support::Project;
34

45
use crate::init_registry;
56
use crate::CargoCommand;
6-
use cargo_test_support::curr_dir;
7+
use cargo_test_support::current_dir;
78

89
#[cargo_test]
910
fn case() {
1011
init_registry();
11-
let project = Project::from_template(curr_dir!().join("in"));
12+
let project = Project::from_template(current_dir!().join("in"));
1213
let project_root = project.root();
1314
let cwd = &project_root;
1415

@@ -18,8 +19,8 @@ fn case() {
1819
.current_dir(cwd)
1920
.assert()
2021
.code(1)
21-
.stdout_matches_path(curr_dir!().join("stdout.log"))
22-
.stderr_matches_path(curr_dir!().join("stderr.log"));
22+
.stdout_eq(file!["stdout.term.svg"])
23+
.stderr_eq(file!["stderr.term.svg"]);
2324

24-
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
25+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
2526
}

tests/cargo-set-version/downgrade_error/stderr.log

-1
This file was deleted.
Loading

tests/cargo-set-version/downgrade_error/stdout.log

Whitespace-only changes.
Loading
+6-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::file;
23
use cargo_test_support::Project;
34

45
use crate::init_registry;
56
use crate::CargoCommand;
6-
use cargo_test_support::curr_dir;
7+
use cargo_test_support::current_dir;
78

89
#[cargo_test]
910
fn case() {
1011
init_registry();
11-
let project = Project::from_template(curr_dir!().join("in"));
12+
let project = Project::from_template(current_dir!().join("in"));
1213
let project_root = project.root();
1314
let cwd = &project_root;
1415

@@ -18,8 +19,8 @@ fn case() {
1819
.current_dir(cwd)
1920
.assert()
2021
.success()
21-
.stdout_matches_path(curr_dir!().join("stdout.log"))
22-
.stderr_matches_path(curr_dir!().join("stderr.log"));
22+
.stdout_eq(file!["stdout.term.svg"])
23+
.stderr_eq(file!["stderr.term.svg"]);
2324

24-
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
25+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
2526
}

tests/cargo-set-version/dry_run/stderr.log

-2
This file was deleted.
Loading

tests/cargo-set-version/dry_run/stdout.log

Whitespace-only changes.
Loading
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::file;
23
use cargo_test_support::Project;
34

45
use crate::init_registry;
56
use crate::CargoCommand;
6-
use cargo_test_support::curr_dir;
7+
use cargo_test_support::current_dir;
78

89
#[cargo_test]
910
fn case() {
1011
init_registry();
11-
let project = Project::from_template(curr_dir!().join("in"));
12+
let project = Project::from_template(current_dir!().join("in"));
1213
let project_root = project.root();
1314
let cwd = &project_root;
1415

@@ -18,8 +19,8 @@ fn case() {
1819
.current_dir(cwd)
1920
.assert()
2021
.success()
21-
.stdout_matches_path(curr_dir!().join("stdout.log"))
22-
.stderr_matches_path(curr_dir!().join("stderr.log"));
22+
.stdout_eq(file!["stdout.term.svg"])
23+
.stderr_eq(file!["stderr.term.svg"]);
2324

24-
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
25+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
2526
}

tests/cargo-set-version/ignore_dependent/stderr.log

-1
This file was deleted.
Loading

tests/cargo-set-version/ignore_dependent/stdout.log

Whitespace-only changes.
Loading
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::file;
23
use cargo_test_support::Project;
34

45
use crate::init_registry;
56
use crate::CargoCommand;
6-
use cargo_test_support::curr_dir;
7+
use cargo_test_support::current_dir;
78

89
#[cargo_test]
910
fn case() {
1011
init_registry();
11-
let project = Project::from_template(curr_dir!().join("in"));
12+
let project = Project::from_template(current_dir!().join("in"));
1213
let project_root = project.root();
1314
let cwd = &project_root;
1415

@@ -18,8 +19,8 @@ fn case() {
1819
.current_dir(cwd)
1920
.assert()
2021
.code(2)
21-
.stdout_matches_path(curr_dir!().join("stdout.log"))
22-
.stderr_matches_path(curr_dir!().join("stderr.log"));
22+
.stdout_eq(file!["stdout.term.svg"])
23+
.stderr_eq(file!["stderr.term.svg"]);
2324

24-
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
25+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
2526
}

tests/cargo-set-version/relative_absolute_conflict/stderr.log

-5
This file was deleted.
Loading

tests/cargo-set-version/relative_absolute_conflict/stdout.log

Whitespace-only changes.
Loading
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::file;
23
use cargo_test_support::Project;
34

45
use crate::init_registry;
56
use crate::CargoCommand;
6-
use cargo_test_support::curr_dir;
7+
use cargo_test_support::current_dir;
78

89
#[cargo_test]
910
fn case() {
1011
init_registry();
11-
let project = Project::from_template(curr_dir!().join("in"));
12+
let project = Project::from_template(current_dir!().join("in"));
1213
let project_root = project.root();
1314
let cwd = &project_root;
1415

@@ -18,8 +19,8 @@ fn case() {
1819
.current_dir(cwd)
1920
.assert()
2021
.success()
21-
.stdout_matches_path(curr_dir!().join("stdout.log"))
22-
.stderr_matches_path(curr_dir!().join("stderr.log"));
22+
.stdout_eq(file!["stdout.term.svg"])
23+
.stderr_eq(file!["stderr.term.svg"]);
2324

24-
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
25+
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
2526
}

tests/cargo-set-version/set_absolute_version/stderr.log

-1
This file was deleted.

0 commit comments

Comments
 (0)