Added unit test for #1951

This commit is contained in:
Nikolaj Olsson 2016-09-13 16:03:38 +02:00
parent 246d95a4c4
commit e4850c4c89

View File

@ -576,6 +576,19 @@ namespace Test
}
}
[TestMethod]
public void FixOcrErrorsViaHardcodedRules2()
{
using (var form = new GoToLine())
{
Configuration.Settings.Tools.OcrFixUseHardcodedRules = true;
const string input = "Foobar\r\n<i>-";
var ofe = new Nikse.SubtitleEdit.Logic.Ocr.OcrFixEngine("eng", "us_en", form);
var res = ofe.FixOcrErrorsViaHardcodedRules(input, "Previous line.", new HashSet<string>());
Assert.AreEqual(res, "Foobar\r\n<i>-");
}
}
[TestMethod]
[DeploymentItem("SubtitleEdit.exe")]
public void FixOcrErrorsViaDoNotFixToUpper()