summaryrefslogtreecommitdiffstats
path: root/vendor/unic-langid-impl/tests/canonicalize_test.rs
blob: b0195828b3076a1541ef0fa230575d541439bbe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use unic_langid_impl::canonicalize;

fn assert_canonicalize(input: &str, output: &str) {
    assert_eq!(&canonicalize(input).unwrap(), output);
}

#[test]
fn test_canonicalize() {
    assert_canonicalize("Pl", "pl");
    assert_canonicalize("eN-uS", "en-US");
    assert_canonicalize("ZH_hans_hK", "zh-Hans-HK");
    assert_canonicalize("en-scouse-fonipa", "en-fonipa-scouse");
}