// Any copyright to the test code below this comment is dedicated to the
// Public Domain. http://creativecommons.org/publicdomain/zero/1.0/

// THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
// Instead, please regenerate using generate-encoding-data.py

use super::*;

#[test]
fn test_all_labels() {
    assert_eq!(Encoding::for_label(b"l1"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"l2"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"l3"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"l4"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"l5"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"l6"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"l9"), Some(ISO_8859_15));
    assert_eq!(Encoding::for_label(b"866"), Some(IBM866));
    assert_eq!(Encoding::for_label(b"mac"), Some(MACINTOSH));
    assert_eq!(Encoding::for_label(b"koi"), Some(KOI8_R));
    assert_eq!(Encoding::for_label(b"gbk"), Some(GBK));
    assert_eq!(Encoding::for_label(b"big5"), Some(BIG5));
    assert_eq!(Encoding::for_label(b"utf8"), Some(UTF_8));
    assert_eq!(Encoding::for_label(b"koi8"), Some(KOI8_R));
    assert_eq!(Encoding::for_label(b"sjis"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"ms932"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"cp866"), Some(IBM866));
    assert_eq!(Encoding::for_label(b"utf-8"), Some(UTF_8));
    assert_eq!(Encoding::for_label(b"cp819"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"ascii"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"x-gbk"), Some(GBK));
    assert_eq!(Encoding::for_label(b"greek"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"cp1250"), Some(WINDOWS_1250));
    assert_eq!(Encoding::for_label(b"cp1251"), Some(WINDOWS_1251));
    assert_eq!(Encoding::for_label(b"latin1"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"gb2312"), Some(GBK));
    assert_eq!(Encoding::for_label(b"cp1252"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"latin2"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"cp1253"), Some(WINDOWS_1253));
    assert_eq!(Encoding::for_label(b"latin3"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"cp1254"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"latin4"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"cp1255"), Some(WINDOWS_1255));
    assert_eq!(Encoding::for_label(b"csbig5"), Some(BIG5));
    assert_eq!(Encoding::for_label(b"latin5"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"utf-16"), Some(UTF_16LE));
    assert_eq!(Encoding::for_label(b"cp1256"), Some(WINDOWS_1256));
    assert_eq!(Encoding::for_label(b"ibm866"), Some(IBM866));
    assert_eq!(Encoding::for_label(b"latin6"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"cp1257"), Some(WINDOWS_1257));
    assert_eq!(Encoding::for_label(b"cp1258"), Some(WINDOWS_1258));
    assert_eq!(Encoding::for_label(b"greek8"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"ibm819"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"arabic"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"visual"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"korean"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"euc-jp"), Some(EUC_JP));
    assert_eq!(Encoding::for_label(b"koi8-r"), Some(KOI8_R));
    assert_eq!(Encoding::for_label(b"koi8_r"), Some(KOI8_R));
    assert_eq!(Encoding::for_label(b"euc-kr"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"x-sjis"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"koi8-u"), Some(KOI8_U));
    assert_eq!(Encoding::for_label(b"hebrew"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"tis-620"), Some(WINDOWS_874));
    assert_eq!(Encoding::for_label(b"gb18030"), Some(GB18030));
    assert_eq!(Encoding::for_label(b"ksc5601"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"gb_2312"), Some(GBK));
    assert_eq!(Encoding::for_label(b"dos-874"), Some(WINDOWS_874));
    assert_eq!(Encoding::for_label(b"cn-big5"), Some(BIG5));
    assert_eq!(Encoding::for_label(b"chinese"), Some(GBK));
    assert_eq!(Encoding::for_label(b"logical"), Some(ISO_8859_8_I));
    assert_eq!(Encoding::for_label(b"cskoi8r"), Some(KOI8_R));
    assert_eq!(Encoding::for_label(b"cseuckr"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"koi8-ru"), Some(KOI8_U));
    assert_eq!(Encoding::for_label(b"x-cp1250"), Some(WINDOWS_1250));
    assert_eq!(Encoding::for_label(b"ksc_5601"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"x-cp1251"), Some(WINDOWS_1251));
    assert_eq!(Encoding::for_label(b"iso88591"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"csgb2312"), Some(GBK));
    assert_eq!(Encoding::for_label(b"x-cp1252"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"iso88592"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"x-cp1253"), Some(WINDOWS_1253));
    assert_eq!(Encoding::for_label(b"iso88593"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"ecma-114"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"x-cp1254"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"iso88594"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"x-cp1255"), Some(WINDOWS_1255));
    assert_eq!(Encoding::for_label(b"iso88595"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"x-x-big5"), Some(BIG5));
    assert_eq!(Encoding::for_label(b"x-cp1256"), Some(WINDOWS_1256));
    assert_eq!(Encoding::for_label(b"csibm866"), Some(IBM866));
    assert_eq!(Encoding::for_label(b"iso88596"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"x-cp1257"), Some(WINDOWS_1257));
    assert_eq!(Encoding::for_label(b"iso88597"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"asmo-708"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"ecma-118"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"elot_928"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"x-cp1258"), Some(WINDOWS_1258));
    assert_eq!(Encoding::for_label(b"iso88598"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso88599"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"cyrillic"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"utf-16be"), Some(UTF_16BE));
    assert_eq!(Encoding::for_label(b"utf-16le"), Some(UTF_16LE));
    assert_eq!(Encoding::for_label(b"us-ascii"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"ms_kanji"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"x-euc-jp"), Some(EUC_JP));
    assert_eq!(Encoding::for_label(b"iso885910"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"iso8859-1"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"iso885911"), Some(WINDOWS_874));
    assert_eq!(Encoding::for_label(b"iso8859-2"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"iso8859-3"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"iso885913"), Some(ISO_8859_13));
    assert_eq!(Encoding::for_label(b"iso8859-4"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"iso885914"), Some(ISO_8859_14));
    assert_eq!(Encoding::for_label(b"iso8859-5"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"iso885915"), Some(ISO_8859_15));
    assert_eq!(Encoding::for_label(b"iso8859-6"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso8859-7"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"iso8859-8"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso-ir-58"), Some(GBK));
    assert_eq!(Encoding::for_label(b"iso8859-9"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"macintosh"), Some(MACINTOSH));
    assert_eq!(Encoding::for_label(b"shift-jis"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"shift_jis"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"iso-ir-100"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"iso8859-10"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"iso-ir-110"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"gb_2312-80"), Some(GBK));
    assert_eq!(Encoding::for_label(b"iso-8859-1"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"iso_8859-1"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"iso-ir-101"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"iso8859-11"), Some(WINDOWS_874));
    assert_eq!(Encoding::for_label(b"iso-8859-2"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"iso_8859-2"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"hz-gb-2312"), Some(REPLACEMENT));
    assert_eq!(Encoding::for_label(b"iso-8859-3"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"iso_8859-3"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"iso8859-13"), Some(ISO_8859_13));
    assert_eq!(Encoding::for_label(b"iso-8859-4"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"iso_8859-4"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"iso8859-14"), Some(ISO_8859_14));
    assert_eq!(Encoding::for_label(b"iso-ir-144"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"iso-8859-5"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"iso_8859-5"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"iso8859-15"), Some(ISO_8859_15));
    assert_eq!(Encoding::for_label(b"iso-8859-6"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso_8859-6"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso-ir-126"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"iso-8859-7"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"iso_8859-7"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"iso-ir-127"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso-ir-157"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"iso-8859-8"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso_8859-8"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso-ir-138"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso-ir-148"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"iso-8859-9"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"iso_8859-9"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"iso-ir-109"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"iso-ir-149"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"big5-hkscs"), Some(BIG5));
    assert_eq!(Encoding::for_label(b"csshiftjis"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"iso-8859-10"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"iso-8859-11"), Some(WINDOWS_874));
    assert_eq!(Encoding::for_label(b"csisolatin1"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"csisolatin2"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"iso-8859-13"), Some(ISO_8859_13));
    assert_eq!(Encoding::for_label(b"csisolatin3"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"iso-8859-14"), Some(ISO_8859_14));
    assert_eq!(Encoding::for_label(b"windows-874"), Some(WINDOWS_874));
    assert_eq!(Encoding::for_label(b"csisolatin4"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"iso-8859-15"), Some(ISO_8859_15));
    assert_eq!(Encoding::for_label(b"iso_8859-15"), Some(ISO_8859_15));
    assert_eq!(Encoding::for_label(b"csisolatin5"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"iso-8859-16"), Some(ISO_8859_16));
    assert_eq!(Encoding::for_label(b"csisolatin6"), Some(ISO_8859_10));
    assert_eq!(Encoding::for_label(b"windows-949"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"csisolatin9"), Some(ISO_8859_15));
    assert_eq!(Encoding::for_label(b"csiso88596e"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"csiso88598e"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"csmacintosh"), Some(MACINTOSH));
    assert_eq!(Encoding::for_label(b"csiso88596i"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"csiso88598i"), Some(ISO_8859_8_I));
    assert_eq!(Encoding::for_label(b"windows-31j"), Some(SHIFT_JIS));
    assert_eq!(Encoding::for_label(b"x-mac-roman"), Some(MACINTOSH));
    assert_eq!(Encoding::for_label(b"iso-2022-cn"), Some(REPLACEMENT));
    assert_eq!(Encoding::for_label(b"iso-2022-jp"), Some(ISO_2022_JP));
    assert_eq!(Encoding::for_label(b"csiso2022jp"), Some(ISO_2022_JP));
    assert_eq!(Encoding::for_label(b"iso-2022-kr"), Some(REPLACEMENT));
    assert_eq!(Encoding::for_label(b"csiso2022kr"), Some(REPLACEMENT));
    assert_eq!(Encoding::for_label(b"replacement"), Some(REPLACEMENT));
    assert_eq!(Encoding::for_label(b"windows-1250"), Some(WINDOWS_1250));
    assert_eq!(Encoding::for_label(b"windows-1251"), Some(WINDOWS_1251));
    assert_eq!(Encoding::for_label(b"windows-1252"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"windows-1253"), Some(WINDOWS_1253));
    assert_eq!(Encoding::for_label(b"windows-1254"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"windows-1255"), Some(WINDOWS_1255));
    assert_eq!(Encoding::for_label(b"windows-1256"), Some(WINDOWS_1256));
    assert_eq!(Encoding::for_label(b"windows-1257"), Some(WINDOWS_1257));
    assert_eq!(Encoding::for_label(b"windows-1258"), Some(WINDOWS_1258));
    assert_eq!(Encoding::for_label(b"iso-8859-6-e"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso-8859-8-e"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso-8859-6-i"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso-8859-8-i"), Some(ISO_8859_8_I));
    assert_eq!(Encoding::for_label(b"sun_eu_greek"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"csksc56011987"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"ks_c_5601-1987"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"ansi_x3.4-1968"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"ks_c_5601-1989"), Some(EUC_KR));
    assert_eq!(Encoding::for_label(b"x-mac-cyrillic"), Some(X_MAC_CYRILLIC));
    assert_eq!(Encoding::for_label(b"x-user-defined"), Some(X_USER_DEFINED));
    assert_eq!(Encoding::for_label(b"csiso58gb231280"), Some(GBK));
    assert_eq!(Encoding::for_label(b"iso_8859-1:1987"), Some(WINDOWS_1252));
    assert_eq!(Encoding::for_label(b"iso_8859-2:1987"), Some(ISO_8859_2));
    assert_eq!(Encoding::for_label(b"iso_8859-6:1987"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"iso_8859-7:1987"), Some(ISO_8859_7));
    assert_eq!(Encoding::for_label(b"iso_8859-3:1988"), Some(ISO_8859_3));
    assert_eq!(Encoding::for_label(b"iso_8859-4:1988"), Some(ISO_8859_4));
    assert_eq!(Encoding::for_label(b"iso_8859-5:1988"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"iso_8859-8:1988"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"iso_8859-9:1989"), Some(WINDOWS_1254));
    assert_eq!(Encoding::for_label(b"csisolatingreek"), Some(ISO_8859_7));
    assert_eq!(
        Encoding::for_label(b"x-mac-ukrainian"),
        Some(X_MAC_CYRILLIC)
    );
    assert_eq!(Encoding::for_label(b"iso-2022-cn-ext"), Some(REPLACEMENT));
    assert_eq!(Encoding::for_label(b"csisolatinarabic"), Some(ISO_8859_6));
    assert_eq!(Encoding::for_label(b"csisolatinhebrew"), Some(ISO_8859_8));
    assert_eq!(Encoding::for_label(b"unicode-1-1-utf-8"), Some(UTF_8));
    assert_eq!(Encoding::for_label(b"csisolatincyrillic"), Some(ISO_8859_5));
    assert_eq!(Encoding::for_label(b"cseucpkdfmtjapanese"), Some(EUC_JP));
}
