Skip to content

Commit

Permalink
test: Ensure we don't rely on unit return values
Browse files Browse the repository at this point in the history
This will allow changing `Execs::run` return type
  • Loading branch information
epage committed Nov 19, 2024
1 parent 5dbda8b commit f80fc01
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ fn cargo_target_empty_env() {
"#]])
.with_status(101)
.run()
.run();
}

#[cargo_test]
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/future_incompat_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion tests/testsuite/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3401,7 +3401,7 @@ fn metadata_links() {
"#]]
.is_json(),
)
.run()
.run();
}

#[cargo_test]
Expand Down
14 changes: 7 additions & 7 deletions tests/testsuite/open_namespaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -100,7 +100,7 @@ fn implicit_lib_within_namespace() {
.is_json(),
)
.with_stderr_data("")
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -169,7 +169,7 @@ fn implicit_bin_within_namespace() {
.is_json(),
)
.with_stderr_data("")
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -256,7 +256,7 @@ fn explicit_bin_within_namespace() {
.is_json(),
)
.with_stderr_data("")
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -354,7 +354,7 @@ path+[ROOTURL]/foo#foo::bar@0.0.1
"#]])
.with_stderr_data("")
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -384,7 +384,7 @@ fn update_spec_accepts_namespaced_name() {
[LOCKING] 0 packages to latest compatible versions
"#]])
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -414,7 +414,7 @@ fn update_spec_accepts_namespaced_pkgid() {
[LOCKING] 0 packages to latest compatible versions
"#]])
.run()
.run();
}

#[cargo_test]
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/pkgid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,5 @@ fn pkgid_json_message_metadata_consistency() {
"#]]
.is_json(),
)
.run()
.run();
}
2 changes: 1 addition & 1 deletion tests/testsuite/precise_pre_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
26 changes: 13 additions & 13 deletions tests/testsuite/pub_priv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -87,7 +87,7 @@ fn exported_pub_dep() {
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
"#]])
.run()
.run();
}

#[cargo_test]
Expand All @@ -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]
Expand Down Expand Up @@ -151,7 +151,7 @@ fn requires_feature() {
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
"#]])
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -194,7 +194,7 @@ Caused by:
'public' specifier can only be used on regular dependencies, not dev-dependencies
"#]])
.run()
.run();
}

#[cargo_test]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3242,7 +3242,7 @@ fn protocol() {
[ERROR] unsupported registry protocol `invalid` (defined in environment variable `CARGO_REGISTRIES_CRATES_IO_PROTOCOL`)
"#]])
.run()
.run();
}

#[cargo_test]
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4307,7 +4307,7 @@ fn test_hint_workspace_virtual() {
"#]])
.with_status(101)
.run()
.run();
}

#[cargo_test]
Expand Down

0 comments on commit f80fc01

Please sign in to comment.