use locale_select::unix::PosixLocale; #[test] fn simple_en_us() { let locale = "en_US.utf8"; let parsed_locale = PosixLocale::from_str(locale); assert_eq!( parsed_locale, PosixLocale { language: "en", territory: Some("US"), codeset: Some("utf8"), modifier: None, } ); assert_eq!( parsed_locale.icu_locale().unwrap(), "en-US-u-va-posix".parse().unwrap() ); }