std.process: Explain escapeShellCommand test failures

This commit is contained in:
Vladimir Panteleev 2023-02-14 14:32:58 +00:00
parent baaa1117de
commit 8c2b3d18fa
No known key found for this signature in database
GPG key ID: 5004F0FAD051576D

View file

@ -3678,10 +3678,14 @@ string escapeShellCommand(scope const(char[])[] args...) @safe pure
];
foreach (test; tests)
{
auto actual = escapeShellCommand(test.args);
version (Windows)
assert(escapeShellCommand(test.args) == test.windows);
string expected = test.windows;
else
assert(escapeShellCommand(test.args) == test.posix );
string expected = test.posix;
assert(actual == expected, "\nExpected: " ~ expected ~ "\nGot: " ~ actual);
}
}
private string escapeShellCommandString(return scope string command) @safe pure