Skip to content

Commit

Permalink
refactor: Resolve deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 28, 2024
1 parent eafc743 commit 9af864e
Show file tree
Hide file tree
Showing 273 changed files with 547 additions and 547 deletions.
2 changes: 1 addition & 1 deletion crates/cargo-test-support/src/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub fn assert_ui() -> snapbox::Assert {
subs.insert("[ROOTURL]", root_url).unwrap();
snapbox::Assert::new()
.action_env(snapbox::assert::DEFAULT_ACTION_ENV)
.substitutions(subs)
.redact_with(subs)
}

/// Normalizes the output so that it can be compared against the expected value.
Expand Down
8 changes: 4 additions & 4 deletions credential/cargo-credential/tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fn stdout_redirected() {
.stdin(format!("{get_request}\n"))
.arg("--cargo-plugin")
.assert()
.stdout_eq_(format!("{hello}\n{err_not_supported}\n").raw())
.stderr_eq_("message on stderr should be sent to the parent process\n".raw())
.stdout_eq(format!("{hello}\n{err_not_supported}\n").raw())
.stderr_eq("message on stderr should be sent to the parent process\n".raw())
.success();
}

Expand All @@ -39,8 +39,8 @@ fn file_provider() {
.stdin(format!("{login_request}\n{get_request}\n"))
.arg("--cargo-plugin")
.assert()
.stdout_eq_(format!("{hello}\n{login_response}\n{get_response}\n").raw())
.stderr_eq_("".raw())
.stdout_eq(format!("{hello}\n{login_response}\n{get_response}\n").raw())
.stderr_eq("".raw())
.success();
std::fs::remove_dir_all(&dir).unwrap();
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo/help/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ fn case() {
.arg("--help")
.assert()
.success()
.stdout_eq_(file!["stdout.term.svg"])
.stderr_eq_(str![""]);
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(str![""]);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo/z_help/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ fn case() {
.args(["-Z", "help"])
.assert()
.success()
.stdout_eq_(file!["stdout.term.svg"])
.stderr_eq_(str![""]);
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(str![""]);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/add_basic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/add_multiple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fn case() {
.current_dir(cwd)
.assert()
.failure()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/add_normalized_name_external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/add_toolchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fn case() {
.current_dir(cwd)
.assert()
.failure()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/change_rename_target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/cyclic_features/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/default_features/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/deprecated_default_features/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn case() {
.current_dir(&cwd)
.assert()
.failure()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/deprecated_section/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn case() {
.current_dir(&cwd)
.assert()
.failure()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/dev_build_conflict/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn case() {
.current_dir(cwd)
.assert()
.code(1)
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/dry_run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/empty_dep_name/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ fn case() {
.current_dir(cwd)
.assert()
.failure()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/features/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/features_empty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/features_preserve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/features_spaced_values/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/features_unknown/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn case() {
.current_dir(cwd)
.assert()
.code(101)
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/features_unknown_no_features/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn case() {
.current_dir(cwd)
.assert()
.code(101)
.stdout_eq_(str![""])
.stderr_eq_(file!["stderr.term.svg"]);
.stdout_eq(str![""])
.stderr_eq(file!["stderr.term.svg"]);

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

0 comments on commit 9af864e

Please sign in to comment.