File: canonicalize_test.rs

package info (click to toggle)
rust-unic-langid-impl 0.9.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 788 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 380 bytes parent folder | download | duplicates (53)
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");
}