Mercurial > projects > dang
diff tests/run.d @ 192:fda35d57847e
Fixed String parsing, so that they get created with the right type in AST.
Also added so that you can parse options to the test program, that will mirror them to Dang.
Eg.
./tests/run --semantic-only
will pass --semantic-only to Dang on each run.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Fri, 25 Jul 2008 15:00:54 +0200 |
parents | e1e170c2cd44 |
children |
line wrap: on
line diff
--- a/tests/run.d Fri Jul 25 14:44:50 2008 +0200 +++ b/tests/run.d Fri Jul 25 15:00:54 2008 +0200 @@ -15,7 +15,7 @@ char[] test_folder = "tests"; char[] valid_filenames = r"^[^.].*"; bool print_expected = false; - +char[][] options; // the tests can be sorted by one of the following functions bool nameSort (FilePath a, FilePath b) { return a.name < b.name; } bool pathSort (FilePath a, FilePath b) { return a.toString < b.toString; } @@ -34,6 +34,9 @@ void main(char[][] args) { + foreach (arg ; args[1..$]) + options ~= arg; + scope scan = new FileScan; // scope regex = new Regex(valid_filenames); // DMD FAILS!! ?? // Return true for files/folders to include @@ -124,7 +127,8 @@ if (compile) { - auto process = new Process(compiler, "--gen-llvm", p.toString()); + auto o = compiler ~ options ~ p.toString; + auto process = new Process(o); process.execute(); auto result = process.wait(); return resultOf(p, result.status, fail);