コード例 #1
0
        public void SanitizeTextForESpeakPreview_Newlines_ReplacedWithSpace()
        {
            string unsafeText = "One\nTwo";
            string safeText   = AudioSegmentationApi.SanitizeTextForESpeakPreview(unsafeText);

            Assert.That(safeText, Is.Not.EqualTo(unsafeText));
            Assert.That(safeText, Is.EqualTo("One Two"));               // There are other acceptable variations that it could equal
        }
コード例 #2
0
        public void SanitizeTextForESpeakPreview_Quotes_Stripped()
        {
            string unsafeText = "One\" && espeak -v en \"Two.";
            string safeText   = AudioSegmentationApi.SanitizeTextForESpeakPreview(unsafeText);

            Assert.That(safeText, Is.Not.EqualTo(unsafeText));                  // Definitely must pass
            Assert.That(safeText, Is.EqualTo("One  && espeak -v en  Two."));    // There are other acceptable variations that it could equal
        }