use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateExcludedWithWildcards.
public void testBasicTemplateExcludedWithWildcards() {
Template template = new Template();
template.setName("Foo:test");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
markupLanguage.setTemplateExcludes("boo, baz, *test*");
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{Foo:test}} two");
assertEquals("one two", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateWithBrackets.
public void testBasicTemplateWithBrackets() {
// Bug 468237
Template template = new Template();
template.setName("Templ(a)te");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{Templ(a)te}} two");
assertEquals("one _expanded_ two", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateDidgitInTheName.
public void testBasicTemplateDidgitInTheName() {
// Bug 380052
Template template = new Template();
template.setName("1stTest");
template.setTemplateMarkup("first test");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("This is a {{1stTest}}.");
assertEquals("This is a first test.", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateNoNamespace.
public void testBasicTemplateNoNamespace() {
// Bug 468237
Template template = new Template();
template.setName(":Test");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{:Test}} two");
assertEquals("one _expanded_ two", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateNoInclude.
public void testBasicTemplateNoInclude() {
Template template = new Template();
template.setName("test");
template.setTemplateMarkup("<noinclude>foo bar baz\n</noinclude>_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{test}} two");
assertEquals("one _expanded_ two", markup);
}
Aggregations