Skip to content

Commit 1d558a9

Browse files
committed
Made blacklist in ScannerTest ignore the source path location of the blacklisted file.
1 parent 820e724 commit 1d558a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test/ScannerTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import org.junit.Test
99
class ScannerTest extends DottyTest {
1010

1111
val blackList = List(
12-
"../scala/src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala",
13-
"../scala/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala"
12+
"/scaladoc/scala/tools/nsc/doc/html/page/Index.scala",
13+
"/scaladoc/scala/tools/nsc/doc/html/page/Template.scala"
1414
)
1515

1616
def scan(name: String): Unit = scan(new PlainFile(name))
@@ -31,12 +31,12 @@ class ScannerTest extends DottyTest {
3131
def scanDir(path: String): Unit = scanDir(Directory(path))
3232

3333
def scanDir(dir: Directory): Unit = {
34-
if (blackList contains dir.jfile.toString)
34+
if (blackList exists (dir.jfile.toString endsWith _))
3535
println(s"blacklisted package: ${dir.jfile.getAbsolutePath}")
3636
else
3737
for (f <- dir.files)
3838
if (f.name.endsWith(".scala"))
39-
if (blackList contains f.jfile.toString)
39+
if (blackList exists (f.jfile.toString endsWith _))
4040
println(s"blacklisted file: ${f.jfile.getAbsolutePath}")
4141
else
4242
scan(new PlainFile(f))

0 commit comments

Comments
 (0)