From f80fc018a60a28ec00d7cf50b1279a5e07d68ceb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 18 Nov 2024 20:52:53 -0600 Subject: [PATCH] test: Ensure we don't rely on unit return values This will allow changing `Execs::run` return type --- tests/testsuite/build.rs | 2 +- tests/testsuite/build_script.rs | 2 +- tests/testsuite/config.rs | 2 +- tests/testsuite/future_incompat_report.rs | 2 +- tests/testsuite/metadata.rs | 2 +- tests/testsuite/open_namespaces.rs | 14 ++++++------ tests/testsuite/package.rs | 2 +- tests/testsuite/pkgid.rs | 2 +- tests/testsuite/precise_pre_release.rs | 2 +- tests/testsuite/pub_priv.rs | 26 +++++++++++------------ tests/testsuite/registry.rs | 4 ++-- tests/testsuite/test.rs | 2 +- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 9f8649f827a..37a6d7cbdb7 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -82,7 +82,7 @@ fn build_with_symlink_to_path_dependency_with_build_script_in_git() { // It is necessary to have a sub-repository and to add files so there is an index. let repo = git::init(&root.join("original")); git::add(&repo); - cargo_process("build").run() + cargo_process("build").run(); } #[cargo_test] diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index 897a0b493ef..5725c728ea7 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -5234,7 +5234,7 @@ fn dev_dep_with_links() { .file("bar/build.rs", "fn main() {}") .file("bar/src/lib.rs", "") .build(); - p.cargo("check --tests").run() + p.cargo("check --tests").run(); } #[cargo_test] diff --git a/tests/testsuite/config.rs b/tests/testsuite/config.rs index 8f9092c2fb2..ddaa168eb97 100644 --- a/tests/testsuite/config.rs +++ b/tests/testsuite/config.rs @@ -1640,7 +1640,7 @@ fn cargo_target_empty_env() { "#]]) .with_status(101) - .run() + .run(); } #[cargo_test] diff --git a/tests/testsuite/future_incompat_report.rs b/tests/testsuite/future_incompat_report.rs index b6e15f1d757..8b3c6700ef6 100644 --- a/tests/testsuite/future_incompat_report.rs +++ b/tests/testsuite/future_incompat_report.rs @@ -453,5 +453,5 @@ big_update v1.0.0 has the following newer versions available: 2.0.0 with_updates v1.0.0 has the following newer versions available: 1.0.1, 1.0.2, 3.0.1 ... "#]]) - .run() + .run(); } diff --git a/tests/testsuite/metadata.rs b/tests/testsuite/metadata.rs index a923c30a84c..5c9015a87a7 100644 --- a/tests/testsuite/metadata.rs +++ b/tests/testsuite/metadata.rs @@ -3401,7 +3401,7 @@ fn metadata_links() { "#]] .is_json(), ) - .run() + .run(); } #[cargo_test] diff --git a/tests/testsuite/open_namespaces.rs b/tests/testsuite/open_namespaces.rs index 4365af26604..6fc018f111e 100644 --- a/tests/testsuite/open_namespaces.rs +++ b/tests/testsuite/open_namespaces.rs @@ -31,7 +31,7 @@ Caused by: See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#open-namespaces for more information about the status of this feature. "#]]) - .run() + .run(); } #[cargo_test] @@ -100,7 +100,7 @@ fn implicit_lib_within_namespace() { .is_json(), ) .with_stderr_data("") - .run() + .run(); } #[cargo_test] @@ -169,7 +169,7 @@ fn implicit_bin_within_namespace() { .is_json(), ) .with_stderr_data("") - .run() + .run(); } #[cargo_test] @@ -256,7 +256,7 @@ fn explicit_bin_within_namespace() { .is_json(), ) .with_stderr_data("") - .run() + .run(); } #[cargo_test] @@ -354,7 +354,7 @@ path+[ROOTURL]/foo#foo::bar@0.0.1 "#]]) .with_stderr_data("") - .run() + .run(); } #[cargo_test] @@ -384,7 +384,7 @@ fn update_spec_accepts_namespaced_name() { [LOCKING] 0 packages to latest compatible versions "#]]) - .run() + .run(); } #[cargo_test] @@ -414,7 +414,7 @@ fn update_spec_accepts_namespaced_pkgid() { [LOCKING] 0 packages to latest compatible versions "#]]) - .run() + .run(); } #[cargo_test] diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index b834493aeaf..0bfed0f53c0 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -3923,7 +3923,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for [PACKAGED] 6 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) "#]]) - .run() + .run(); } #[cargo_test] diff --git a/tests/testsuite/pkgid.rs b/tests/testsuite/pkgid.rs index 02656031658..9b74420c0ba 100644 --- a/tests/testsuite/pkgid.rs +++ b/tests/testsuite/pkgid.rs @@ -403,5 +403,5 @@ fn pkgid_json_message_metadata_consistency() { "#]] .is_json(), ) - .run() + .run(); } diff --git a/tests/testsuite/precise_pre_release.rs b/tests/testsuite/precise_pre_release.rs index 6c6b6cc55ff..71c9a3a787e 100644 --- a/tests/testsuite/precise_pre_release.rs +++ b/tests/testsuite/precise_pre_release.rs @@ -39,7 +39,7 @@ if you are looking for the prerelease package it needs to be specified explicitl perhaps a crate was updated and forgotten to be re-vendored? "#]]) - .run() + .run(); } #[cargo_test] diff --git a/tests/testsuite/pub_priv.rs b/tests/testsuite/pub_priv.rs index 6d81faced09..b9769809749 100644 --- a/tests/testsuite/pub_priv.rs +++ b/tests/testsuite/pub_priv.rs @@ -42,7 +42,7 @@ fn exported_priv_warning() { src/lib.rs:3:13: [WARNING] type `FromPriv` from private dependency 'priv_dep' in public interface ... "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -87,7 +87,7 @@ fn exported_pub_dep() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test] @@ -113,7 +113,7 @@ Caused by: See https://doc.rust-lang.org/[..]cargo/reference/unstable.html#public-dependency for more information about using this feature. "#]]) - .run() + .run(); } #[cargo_test] @@ -151,7 +151,7 @@ fn requires_feature() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test] @@ -194,7 +194,7 @@ Caused by: 'public' specifier can only be used on regular dependencies, not dev-dependencies "#]]) - .run() + .run(); } #[cargo_test] @@ -233,7 +233,7 @@ fn pub_dev_dependency_without_feature() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -291,7 +291,7 @@ Caused by: foo2 is public, but workspace dependencies cannot be public "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -336,7 +336,7 @@ fn allow_priv_in_tests() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -381,7 +381,7 @@ fn allow_priv_in_benchs() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -427,7 +427,7 @@ fn allow_priv_in_bins() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -473,7 +473,7 @@ fn allow_priv_in_examples() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -520,7 +520,7 @@ fn allow_priv_in_custom_build() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] @@ -576,7 +576,7 @@ fn publish_package_with_public_dependency() { [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) - .run() + .run(); } #[cargo_test(nightly, reason = "exported_private_dependencies lint is unstable")] diff --git a/tests/testsuite/registry.rs b/tests/testsuite/registry.rs index 193e093bbeb..896aab44bb8 100644 --- a/tests/testsuite/registry.rs +++ b/tests/testsuite/registry.rs @@ -3242,7 +3242,7 @@ fn protocol() { [ERROR] unsupported registry protocol `invalid` (defined in environment variable `CARGO_REGISTRIES_CRATES_IO_PROTOCOL`) "#]]) - .run() + .run(); } #[cargo_test] @@ -3253,7 +3253,7 @@ fn http_requires_trailing_slash() { [ERROR] sparse registry url must end in a slash `/`: sparse+https://invalid.crates.io/test "#]]) - .run() + .run(); } // Limit the test to debug builds so that `__CARGO_TEST_MAX_UNPACK_SIZE` will take affect. diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index d96309a6828..48d69526ad7 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -4307,7 +4307,7 @@ fn test_hint_workspace_virtual() { "#]]) .with_status(101) - .run() + .run(); } #[cargo_test]