Fix compiling tests/vibe.core.process.d for versions < 2080

This commit is contained in:
Benjamin Schaaf 2019-06-02 22:54:59 +10:00
parent 0d4840b81d
commit ab26527e7a

View file

@ -5,8 +5,6 @@ dependency "vibe-core" path="../"
+/ +/
module test; module test;
static if (__VERSION__ >= 2080) {
import core.thread; import core.thread;
import vibe.core.log; import vibe.core.log;
import vibe.core.core; import vibe.core.core;
@ -179,32 +177,32 @@ void testLineEndings()
void main() void main()
{ {
runTask({ static if (__VERSION__ >= 2080) {
auto tasks = [ runTask({
&testEcho, auto tasks = [
&testCat, &testEcho,
&testStderr, &testCat,
&testRandomDeath, &testStderr,
&testIgnoreSigterm, &testRandomDeath,
&testSimpleShell, &testIgnoreSigterm,
&testLineEndings, &testSimpleShell,
].map!(fn => runTask({ &testLineEndings,
try { ].map!(fn => runTask({
fn(); try {
} catch (Exception e) { fn();
logError("%s", e); } catch (Exception e) {
throw e; logError("%s", e);
throw e;
}
}));
foreach (task; tasks) {
task.join();
} }
}));
foreach (task; tasks) { exitEventLoop();
task.join(); });
}
exitEventLoop();
});
runEventLoop();
}
runEventLoop();
}
} }