Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Switch cargo-test-support to registry #808

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 120 additions & 115 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "2"
repository = "https://github.com/crate-ci/cargo-release"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.76" # MSRV
rust-version = "1.78" # MSRV
include = [
"build.rs",
"src/**/*",
Expand Down Expand Up @@ -164,9 +164,9 @@ anstyle = "1.0.7"
[dev-dependencies]
assert_fs = "1.1"
predicates = "3.1"
snapbox = "0.4.16"
cargo-test-macro.git = "https://github.com/rust-lang/cargo"
cargo-test-support.git = "https://github.com/rust-lang/cargo"
snapbox = "0.6.16"
cargo-test-macro = "0.2.1"
cargo-test-support = "0.2.1"

[profile.release]
panic = "abort"
Expand Down
11 changes: 6 additions & 5 deletions tests/testsuite/version/downgrade_error/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use cargo_test_support::compare::assert_ui;
use cargo_test_support::current_dir;
use cargo_test_support::file;

use crate::git_from;
use crate::init_registry;
use crate::CargoCommand;
use cargo_test_support::curr_dir;

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

Expand All @@ -18,8 +19,8 @@ fn case() {
.current_dir(cwd)
.assert()
.code(101)
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
1 change: 0 additions & 1 deletion tests/testsuite/version/downgrade_error/stderr.log

This file was deleted.

25 changes: 25 additions & 0 deletions tests/testsuite/version/downgrade_error/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.
Empty file.
21 changes: 21 additions & 0 deletions tests/testsuite/version/downgrade_error/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.
11 changes: 6 additions & 5 deletions tests/testsuite/version/dry_run/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use cargo_test_support::compare::assert_ui;
use cargo_test_support::current_dir;
use cargo_test_support::file;

use crate::git_from;
use crate::init_registry;
use crate::CargoCommand;
use cargo_test_support::curr_dir;

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

Expand All @@ -18,8 +19,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
3 changes: 0 additions & 3 deletions tests/testsuite/version/dry_run/stderr.log

This file was deleted.

29 changes: 29 additions & 0 deletions tests/testsuite/version/dry_run/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.
Empty file.
21 changes: 21 additions & 0 deletions tests/testsuite/version/dry_run/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.
11 changes: 6 additions & 5 deletions tests/testsuite/version/ignore_dependent/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use cargo_test_support::compare::assert_ui;
use cargo_test_support::current_dir;
use cargo_test_support::file;

use crate::git_from;
use crate::init_registry;
use crate::CargoCommand;
use cargo_test_support::curr_dir;

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

Expand All @@ -25,8 +26,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
2 changes: 0 additions & 2 deletions tests/testsuite/version/ignore_dependent/stderr.log

This file was deleted.

27 changes: 27 additions & 0 deletions tests/testsuite/version/ignore_dependent/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.
Empty file.
21 changes: 21 additions & 0 deletions tests/testsuite/version/ignore_dependent/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.
11 changes: 6 additions & 5 deletions tests/testsuite/version/set_absolute_version/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use cargo_test_support::compare::assert_ui;
use cargo_test_support::current_dir;
use cargo_test_support::file;

use crate::git_from;
use crate::init_registry;
use crate::CargoCommand;
use cargo_test_support::curr_dir;

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

Expand All @@ -18,8 +19,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(file!["stderr.term.svg"]);

assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
assert_ui().subset_matches(current_dir!().join("out"), &project_root);
}
2 changes: 0 additions & 2 deletions tests/testsuite/version/set_absolute_version/stderr.log

This file was deleted.

27 changes: 27 additions & 0 deletions tests/testsuite/version/set_absolute_version/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.
Empty file.
21 changes: 21 additions & 0 deletions tests/testsuite/version/set_absolute_version/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.
11 changes: 6 additions & 5 deletions tests/testsuite/version/set_absolute_workspace_version/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use cargo_test_support::compare::assert_ui;
use cargo_test_support::current_dir;
use cargo_test_support::file;

use crate::git_from;
use crate::init_registry;
use crate::CargoCommand;
use cargo_test_support::curr_dir;

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

Expand All @@ -25,8 +26,8 @@ fn case() {
.current_dir(cwd)
.assert()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
.stdout_eq(file!["stdout.term.svg"])
.stderr_eq(file!["stderr.term.svg"]);

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

This file was deleted.

Loading
Loading