Example #1
0
        /// <summary>
        /// Check that xxx1_Wwww_YY2_ZZZ3 installed correctly
        /// </summary>
        private void Checkel_Mysc_UNH_IPAResults()
        {
            Icu.UErrorCode error;
            string         result;

            Icu.SetDataDirectory(TestUtils.GetIcuDataDir());
            Icu.GetDisplayName("el_Mysc_UNH_IPA", "en", out result, out error);
            Assert.AreEqual("Greek (MyScript, UnheardOf, IPA)", result, "Data not put into the ICUFiles");
            Icu.GetDisplayLanguage("el_Mysc_UNH_IPA", "en", out result, out error);
            Assert.AreEqual("Greek", result, "Greek should not be changed as it is a factory value.");
            Icu.GetDisplayScript("el_Mysc_UNH_IPA", "en", out result, out error);
            Assert.AreEqual("MyScript", result, "The display script should be changed.");
            Icu.GetDisplayCountry("el_Mysc_UNH_IPA", "en", out result, out error);
            Assert.AreEqual("UnheardOf", result, "The display country should be changed.");
            Icu.GetDisplayVariant("el_Mysc_UNH_IPA", "en", out result, out error);
            Assert.AreEqual("IPA", result, "The display variant should not be changed.");

            StreamReader reader;

            TestUtils.RunProgram("InstallLanguage", "-q -customLanguages", 0, out reader);
            string output = reader.ReadToEnd();

            Assert.IsTrue(output.IndexOf("<el>") == -1,
                          "Should not have installed factory locale 'el' as a custom language." +
                          "Installed Custom Languages: " + output.ToString());
        }