approvals / ApprovalTests.cpp

Native ApprovalTests for C++ on Linux, Mac and Windows
https://approvaltestscpp.readthedocs.io/en/latest/
Apache License 2.0
316 stars 51 forks source link

Possible incorrect quoting in foreground commands on windows? #104

Closed claremacrae closed 3 years ago

claremacrae commented 4 years ago

Whilst running the tests on my machine, I just noticed the double quotes at the start and end of this line...

https://github.com/jwillikers/ApprovalTests.cpp/blob/c46c53282388f903d0b698a052f1ea8a6ae857c0/tests/DocTest_Tests/reporters/approval_tests/CommandLineReporterTests.Test_Command_Lines.approved.txt#L73

These are the first reporters in this file to run in the foreground, so it's the first time I've seen this output...

Naively, I would have thought that the pairs of double-quotes would have confused the CMD exe - but as you've tested it on Windows, I guess it somehow just magically works....

I think I may have got the quotes wrong on this, for the foreground case...

https://github.com/approvals/ApprovalTests.cpp/blob/75f65da3a2dcf03c5fda529a374c1e81384ea3c1/ApprovalTests/launchers/SystemLauncher.h#L62-L65

claremacrae commented 4 years ago

I've separated this out from my comments in #103.