Skip to content

Commit

Permalink
chore: Switch cargo-test-support to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Aug 1, 2024
1 parent 45b1f45 commit 7c729bd
Show file tree
Hide file tree
Showing 72 changed files with 925 additions and 239 deletions.
235 changes: 120 additions & 115 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
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

0 comments on commit 7c729bd

Please sign in to comment.