Skip to content

Commit

Permalink
test: add tests for more platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc committed Jan 1, 2025
1 parent 3206c85 commit f515ba0
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions crates/maa-cli/src/installer/maa_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,32 @@ mod tests {
assert_eq!(
extract_mapper(
Cow::Borrowed(Path::new("libM.so")),
&lib_dir,
&resource_dir,
lib_dir,
resource_dir,
&config
),
Some(lib_dir.join("libM.so"))
);
#[cfg(target_os = "macos")]
assert_eq!(
extract_mapper(
Cow::Borrowed(Path::new("libM.dylib")),
lib_dir,
resource_dir,
&config
),
Some(lib_dir.join("libM.dylib"))
);
#[cfg(target_os = "windows")]
assert_eq!(
extract_mapper(
Cow::Borrowed(Path::new("libM.dll")),
lib_dir,
resource_dir,
&config
),
Some(lib_dir.join("libM.dll"))
);
assert_eq!(
extract_mapper(
Cow::Borrowed(Path::new("resource/config.json")),
Expand Down

0 comments on commit f515ba0

Please sign in to comment.