use of org.omegat.filters2.text.ilias.ILIASFilter in project omegat by omegat-org.
the class ILIASFilterTest method testAlign.
@Test
public void testAlign() throws Exception {
final AlignResultHolder alignResult = new AlignResultHolder();
align(new ILIASFilter(), "ilias/ILIASFilterAlign.lang", "ilias/ILIASFilterAlign-tr.lang", new IAlignCallback() {
@Override
public void addTranslation(String id, String source, String translation, boolean isFuzzy, String comment, IFilter filter) {
alignResult.aligned = id.equals("module_name#:#variable_name") && source.equals("original") && translation.equals("translated");
}
});
assertTrue(alignResult.aligned);
}
use of org.omegat.filters2.text.ilias.ILIASFilter in project omegat by omegat-org.
the class ILIASFilterTest method testParse.
@Test
public void testParse() throws Exception {
List<String> entries = parse(new ILIASFilter(), "test/data/filters/ilias/ILIASFilter.lang");
assertEquals(7, entries.size());
int i = 0;
assertEquals("Good line", entries.get(i++));
assertEquals("Another good line with HTML <br/> entity", entries.get(i++));
assertEquals("The text may include : too", entries.get(i++));
assertEquals("The text may include # as well", entries.get(i++));
// note the space after "or"
assertEquals("The text may include #:# or ", entries.get(i++));
assertEquals("have it at the end #:#", entries.get(i++));
assertEquals("#:#", entries.get(i++));
}
Aggregations