Skip to content

Commit 77c52c2

Browse files
committed
Move constructor fn for manifest with readme to test file
1 parent 4d8e1ea commit 77c52c2

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,24 +1622,6 @@ pub fn basic_lib_manifest(name: &str) -> String {
16221622
)
16231623
}
16241624

1625-
pub fn basic_bin_manifest_with_readme(name: &str, readme_filename: &str) -> String {
1626-
format!(
1627-
r#"
1628-
[package]
1629-
1630-
name = "{}"
1631-
version = "0.5.0"
1632-
authors = ["wycats@example.com"]
1633-
readme = {}
1634-
1635-
[[bin]]
1636-
1637-
name = "{}"
1638-
"#,
1639-
name, readme_filename, name
1640-
)
1641-
}
1642-
16431625
pub fn path2url<P: AsRef<Path>>(p: P) -> Url {
16441626
Url::from_file_path(p).ok().unwrap()
16451627
}

tests/testsuite/read_manifest.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Tests for the `cargo read-manifest` command.
22
3-
use cargo_test_support::{basic_bin_manifest, basic_bin_manifest_with_readme, main_file, project};
3+
use cargo_test_support::{basic_bin_manifest, main_file, project};
44

55
fn manifest_output(readme_value: &str) -> String {
66
format!(
@@ -44,6 +44,24 @@ fn manifest_output_no_readme() -> String {
4444
manifest_output("null")
4545
}
4646

47+
pub fn basic_bin_manifest_with_readme(name: &str, readme_filename: &str) -> String {
48+
format!(
49+
r#"
50+
[package]
51+
52+
name = "{}"
53+
version = "0.5.0"
54+
authors = ["wycats@example.com"]
55+
readme = {}
56+
57+
[[bin]]
58+
59+
name = "{}"
60+
"#,
61+
name, readme_filename, name
62+
)
63+
}
64+
4765
#[cargo_test]
4866
fn cargo_read_manifest_path_to_cargo_toml_relative() {
4967
let p = project()

0 commit comments

Comments
 (0)