removing ^M from the file
This commit is contained in:
parent
31a9795d84
commit
30af95bd2a
|
|
@ -1,45 +1,45 @@
|
|||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class RequiredRegexpCheckTest
|
||||
extends BaseCheckTestCase
|
||||
{
|
||||
public void testExistingInDoc()
|
||||
throws Exception
|
||||
{
|
||||
final String required = "Test case file";
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RequiredRegexpCheck.class);
|
||||
checkConfig.addAttribute("format", required);
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
|
||||
public void testExistingInCode()
|
||||
throws Exception
|
||||
{
|
||||
final String required = "package";
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RequiredRegexpCheck.class);
|
||||
checkConfig.addAttribute("format", required);
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
|
||||
public void testMissing()
|
||||
throws Exception
|
||||
{
|
||||
final String required = "This text is not in the file";
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RequiredRegexpCheck.class);
|
||||
checkConfig.addAttribute("format", required);
|
||||
final String[] expected = {
|
||||
"0: Required pattern '" + required + "' missing in file."
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
}
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class RequiredRegexpCheckTest
|
||||
extends BaseCheckTestCase
|
||||
{
|
||||
public void testExistingInDoc()
|
||||
throws Exception
|
||||
{
|
||||
final String required = "Test case file";
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RequiredRegexpCheck.class);
|
||||
checkConfig.addAttribute("format", required);
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
|
||||
public void testExistingInCode()
|
||||
throws Exception
|
||||
{
|
||||
final String required = "package";
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RequiredRegexpCheck.class);
|
||||
checkConfig.addAttribute("format", required);
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
|
||||
public void testMissing()
|
||||
throws Exception
|
||||
{
|
||||
final String required = "This text is not in the file";
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RequiredRegexpCheck.class);
|
||||
checkConfig.addAttribute("format", required);
|
||||
final String[] expected = {
|
||||
"0: Required pattern '" + required + "' missing in file."
|
||||
};
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue