1 | public void testExcludePattern() {↵ | | 1 | public void testIncludePattern() {↵
|
2 | testf.excludePattern(PATTERNS);↵ | | 2 | testf.includePattern(PATTERNS);↵
|
3 | for (int idx = 0; idx < TESTDATA.length; idx++) {↵ | | 3 | for (int idx = 0; idx < TESTDATA.length; idx++) {↵
|
4 | TestData td = TESTDATA[idx];↵ | | 4 | TestData td = TESTDATA[idx];↵
|
5 | String theFile = td.file;↵ | | 5 | String theFile = td.file;↵
|
6 | boolean expect = td.exclpatt;↵ | | 6 | boolean expect = td.inclpatt;↵
|
|
7 | assertEquals(!expect, testf.isFiltered(theFile,null));↵ | | 7 | assertEquals(!expect, testf.isFiltered(theFile,null));↵
|
8 | String line = testf.filter(theFile);↵ | | 8 | String line = testf.filter(theFile);↵
|
9 | if (line != null) {↵ | | 9 | if (line != null) {↵
|
10 | assertTrue("Expect to accept " + theFile, expect);↵ | | 10 | assertTrue("Expect to accept " + theFile, expect);↵
|
11 | } else {↵ | | 11 | } else {↵
|
12 | assertFalse("Expect to reject " + theFile, expect);↵ | | 12 | assertFalse("Expect to reject " + theFile, expect);↵
|
13 | | | 13 |
|