mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
We would concatenate and re-tokenise the command line even though we
receive the command line pre-tokenised. This behaviour was introduced in
cfde1fb693 in order to deal with paths
which may be escaped. Rather than joining the arguments and
re-tokenising to unescape the parameters, prefer instead to process each
argument individually to unescape any parameter. By doing this, we are
no longer required to ensure that the parameters are properly shell
quoted prior to passing them to the scanner, but any escaped parameter
will be unescaped.
This repairs some of the test failures in the swift-driver test suite on
Windows.
Adjust the test to properly construct the command line and take the
opportunity to slightly improve the test by changing a few `ASSERT_TRUE`
to `EXPECT_EQ`. The former will terminate the test, the latter will
continue. More importantly, the `_EQ` variant reports the LHS and RHS,
allowing easier debugging.