Skip to content

Commit

Permalink
test: Expect Darwin not macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
peasee committed Sep 18, 2024
1 parent 3f814d8 commit 2eae58d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub(crate) fn get_user_agent() -> String {
let os_type = std::env::consts::OS;
let os_type = match os_type {
"" => "unknown".to_string(),
"macos" => "macOS".to_string(),
"macos" => "Darwin".to_string(),
"linux" => "Linux".to_string(),
"windows" => "Windows".to_string(),
"ios" => "iOS".to_string(),
Expand All @@ -33,7 +33,7 @@ pub(crate) fn get_user_agent() -> String {
"netbsd" => "NetBSD".to_string(),
"openbsd" => "OpenBSD".to_string(),
"solaris" => "Solaris".to_string(),
_ => os_type.to_string(),
_ => os_type.to_string(),
};

let os_arch = std::env::consts::ARCH;
Expand Down Expand Up @@ -61,7 +61,7 @@ mod test {
#[test]
fn test_get_user_agent() {
let matching_regex = regex::Regex::new(
r"spice-rs \d+\.\d+\.\d+ \((Linux|Windows|macOS)/[\d\w\.\-\_]+ (x86_64|aarch64|i386)\)",
r"spice-rs \d+\.\d+\.\d+ \((Linux|Windows|Darwin)/[\d\w\.\-\_]+ (x86_64|aarch64|i386)\)",
)
.expect("regex should be constructed");

Expand Down

0 comments on commit 2eae58d

Please sign in to comment.