Issue #2161: unify test input locations for api package

This commit is contained in:
rnveach 2015-10-19 13:02:32 -04:00
parent 58bbf2f190
commit 9c488c1f51
2 changed files with 17 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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>