Issue #2161: unify test input locations for api package
This commit is contained in:
parent
58bbf2f190
commit
9c488c1f51
|
|
@ -29,7 +29,6 @@ import java.io.UnsupportedEncodingException;
|
|||
import org.junit.Test;
|
||||
|
||||
public class FileTextTest {
|
||||
|
||||
@Test
|
||||
public void testUnsupportedCharset() throws IOException {
|
||||
// just to make UT coverage 100%
|
||||
|
|
@ -48,7 +47,7 @@ public class FileTextTest {
|
|||
public void testSupportedCharset() throws IOException {
|
||||
String charsetName = "ISO-8859-1";
|
||||
FileText o = new FileText(new File("src/test/resources/com/puppycrawl/tools/"
|
||||
+ "checkstyle/checks/imports/import-control_complete.xml"), charsetName);
|
||||
+ "checkstyle/api/import-control_complete.xml"), charsetName);
|
||||
assertEquals(o.getCharset().name(), charsetName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE import-control PUBLIC
|
||||
"-//Puppy Crawl//DTD Import Control 1.0//EN"
|
||||
"http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
|
||||
|
||||
<import-control pkg="com">
|
||||
<allow class="some.class"/>
|
||||
<disallow class="another.class" local-only="true"/>
|
||||
<allow pkg="some.pkg"/>
|
||||
<disallow pkg="another.pkg" local-only="true"/>
|
||||
<disallow pkg="and.another.pkg" exact-match="true"/>
|
||||
<subpackage name="puppycrawl">
|
||||
<disallow pkg="some.pkg"/>
|
||||
<disallow class="some.class"/>
|
||||
</subpackage>
|
||||
</import-control>
|
||||
Loading…
Reference in New Issue