use of org.eclipse.mylyn.wikitext.validation.ValidationProblem in project mylyn.docs by eclipse.
the class BlockWhitespaceRuleTest method testMatch3.
public void testMatch3() {
final String markup = "\n\n\nbc..\nfoo";
ValidationProblem problem = rule.findProblem(markup, 0, markup.length());
assertNotNull(problem);
assertEquals(3, problem.getOffset());
}
use of org.eclipse.mylyn.wikitext.validation.ValidationProblem in project mylyn.docs by eclipse.
the class BlockWhitespaceRuleTest method testNoMatch.
public void testNoMatch() {
final String markup = "bc. \nfoo";
ValidationProblem problem = rule.findProblem(markup, 0, markup.length());
assertNull(problem);
}
use of org.eclipse.mylyn.wikitext.validation.ValidationProblem in project mylyn.docs by eclipse.
the class ListWhitespaceValidationRuleTest method testPositiveMatchFirstItemNotMultipleOf3.
public void testPositiveMatchFirstItemNotMultipleOf3() {
String markup = "some text\n\n * a bad list item\n * not a list item\n\nmore text";
ValidationProblem problem = rule.findProblem(markup, 0, markup.length());
assertNotNull(problem);
assertEquals(11, problem.getOffset());
}
use of org.eclipse.mylyn.wikitext.validation.ValidationProblem in project mylyn.docs by eclipse.
the class ListWhitespaceValidationRuleTest method testNegativeMatch.
public void testNegativeMatch() {
String markup = "some text\n\n * a valid list item\n * another valid list item\n\nmore text";
ValidationProblem problem = rule.findProblem(markup, 0, markup.length());
assertNull(problem);
}
use of org.eclipse.mylyn.wikitext.validation.ValidationProblem in project mylyn.docs by eclipse.
the class ListWhitespaceValidationRuleTest method testPositiveMatchNumeric.
public void testPositiveMatchNumeric() {
String markup = "some text\n\n 1. a bad list item\n 1. another valid list item\n\nmore text";
ValidationProblem problem = rule.findProblem(markup, 0, markup.length());
assertNotNull(problem);
assertEquals(11, problem.getOffset());
}
Aggregations