From f3d42cd1358ef6d317a6adb4ae4fc9a28cc01c7e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 11 Oct 2014 19:29:13 +0200 Subject: Add possibility to compile all files in a directory and all subdirectories. We better make this configurable. Because sometimes we want to compile only the files in the immediate directory. --- test/test/CompilerTest.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/test/CompilerTest.scala') diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala index f5b138454..c9c7c602b 100644 --- a/test/test/CompilerTest.scala +++ b/test/test/CompilerTest.scala @@ -24,8 +24,12 @@ class CompilerTest extends DottyTest { compileDir(Directory(path), args, xerrors) def compileDir(dir: Directory, args: List[String], xerrors: Int)(implicit defaultOptions: List[String]): Unit = { - val fileNames = dir.deepFiles.toArray.map(_.toString).filter(_ endsWith ".scala") - compileArgs(fileNames ++ args, xerrors) + val (files, normArgs) = args match { + case "-deep" :: args1 => (dir.deepFiles, args1) + case _ => (dir.files, args) + } + val fileNames = files.toArray.map(_.toString).filter(_ endsWith ".scala") + compileArgs(fileNames ++ normArgs, xerrors) } def compileFiles(path: String, args: List[String] = Nil)(implicit defaultOptions: List[String]): Unit = { -- cgit v1.2.3