comparison tests/runminitest.d @ 463:ea991021a56a

Use path separator to make minitests work on windows.
author Christian Kamm <kamm incasoftware de>
date Sun, 03 Aug 2008 14:03:15 +0200
parents 94c4e090c1af
children 45a67b6f1310
comparison
equal deleted inserted replaced
462:f7ba5f705d59 463:ea991021a56a
47 auto contents = listdir(".", "*.d"); 47 auto contents = listdir(".", "*.d");
48 foreach(c; contents) { 48 foreach(c; contents) {
49 auto testname = getName(getBaseName(c)); 49 auto testname = getName(getBaseName(c));
50 writefln("TEST NAME: ", testname); 50 writefln("TEST NAME: ", testname);
51 51
52 string cmd = format("llvmdc %s -quiet -ofobj/%s -odobj", c, testname); 52 string cmd = format("llvmdc %s -quiet -ofobj" ~ std.path.sep ~ "%s -odobj", c, testname);
53 foreach(v; args[1..$]) { 53 foreach(v; args[1..$]) {
54 cmd ~= ' '; 54 cmd ~= ' ';
55 cmd ~= v; 55 cmd ~= v;
56 } 56 }
57 int cl = classify(testname); 57 int cl = classify(testname);
59 if (system(cmd) != 0) { 59 if (system(cmd) != 0) {
60 if (cl != NOCOMPILE) 60 if (cl != NOCOMPILE)
61 compilefailed ~= c; 61 compilefailed ~= c;
62 } 62 }
63 else if (cl == RUN || cl == NORUN) { 63 else if (cl == RUN || cl == NORUN) {
64 if (system("obj/" ~ testname) != 0) { 64 if (system("obj" ~ std.path.sep ~ testname) != 0) {
65 if (cl == RUN) 65 if (cl == RUN)
66 runfailed ~= c; 66 runfailed ~= c;
67 } 67 }
68 else { 68 else {
69 if (cl == NORUN) 69 if (cl == NORUN)