mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Added the no_run attribute
This commit is contained in:
parent
ea0d487b99
commit
ff7ff7d50d
@ -4,11 +4,12 @@ use std::path::{Path, PathBuf};
|
||||
|
||||
/// Used by `cargo install` tests to assert an executable binary
|
||||
/// has been installed. Example usage:
|
||||
///
|
||||
/// ```no_run
|
||||
/// use cargo_test_support::install::assert_has_installed_exe;
|
||||
/// use cargo_test_support::install::cargo_home;
|
||||
///
|
||||
/// assert_has_installed_exe(cargo_home(), "foo");
|
||||
/// ```
|
||||
#[track_caller]
|
||||
pub fn assert_has_installed_exe<P: AsRef<Path>>(path: P, name: &'static str) {
|
||||
assert!(check_has_installed_exe(path, name));
|
||||
|
@ -450,11 +450,10 @@ impl RegistryBuilder {
|
||||
/// `VendorPackage` which implements directory sources.
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// ```no_run
|
||||
/// use cargo_test_support::registry::Package;
|
||||
/// use cargo_test_support::project;
|
||||
///
|
||||
/// fn crate_package_test() {
|
||||
/// // Publish package "a" depending on "b".
|
||||
/// Package::new("a", "1.0.0")
|
||||
/// .dep("b", "1.0.0")
|
||||
@ -488,7 +487,6 @@ impl RegistryBuilder {
|
||||
/// .build();
|
||||
///
|
||||
/// p.cargo("run").with_stdout("24").run();
|
||||
/// }
|
||||
/// ```
|
||||
#[must_use]
|
||||
pub struct Package {
|
||||
|
Loading…
x
Reference in New Issue
Block a user