mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
19 lines
537 B
Rust
19 lines
537 B
Rust
use nu_test_support::locale_override::with_locale_override;
|
|
use nu_utils::get_system_locale;
|
|
use num_format::Grouping;
|
|
|
|
#[test]
|
|
fn test_get_system_locale_en() {
|
|
let locale = with_locale_override("en_US.UTF-8", get_system_locale);
|
|
|
|
assert_eq!(locale.name(), "en");
|
|
assert_eq!(locale.grouping(), Grouping::Standard)
|
|
}
|
|
|
|
#[test]
|
|
fn test_get_system_locale_de() {
|
|
let locale = with_locale_override("de_DE.UTF-8", get_system_locale);
|
|
|
|
assert_eq!(locale.name(), "de");
|
|
assert_eq!(locale.grouping(), Grouping::Standard)
|
|
}
|