lsmem: String path concat on Windows

This commit is contained in:
Foorack
2025-02-09 17:32:02 +01:00
parent 642703cf36
commit 5774bac639
2 changed files with 9 additions and 6 deletions

View File

@@ -360,12 +360,9 @@ impl Options {
}
fn read_info(lsmem: &mut Lsmem, opts: &mut Options) {
let path_block_size = Path::new(&opts.sysmem).join(PATH_SUB_BLOCK_SIZE_BYTES);
lsmem.block_size = u64::from_str_radix(
&read_file_content::<String>(Path::new(&format!(
"{}/{}",
opts.sysmem, PATH_SUB_BLOCK_SIZE_BYTES
)))
.unwrap(),
&read_file_content::<String>(path_block_size.as_path()).unwrap(),
16,
)
.unwrap();

View File

@@ -7,7 +7,13 @@ use crate::common::util::TestScenario;
#[must_use]
fn sysroot() -> String {
format!("{}/tests/fixtures/lsmem/input", env!("CARGO_MANIFEST_DIR"))
path_concat!(
env!("CARGO_MANIFEST_DIR"),
"tests",
"fixtures",
"lsmem",
"input"
)
}
fn sysroot_test_with_args(expected_output: &str, args: &[&str]) {