CommandLineToArgvW is defined in shellapi.h not windows.h although the former is usually included by the latter unless e.g. WIN32_LEAN_AND_MEAN is defined.
Put nowide headers at top, to test for self-containment
Then custom headers (i.e. "" style includes)
then boost headers (semi-standard)
then standard headers (all other <> style includes)
Every test had the same pattern of a main catching exceptions and
returning 0 or 1 based on that. Factor that into test.hpp.
As most code in test.hpp is only executed on failure and those should
not occur this file is excluded from coverage.
Finally test.hpp is included last and the header to test first
consistently to check for self-sufficient includes.
Split parent and child code into functions for better output
Introduce TEST_EQUAL for better output
Compare each entry in env-pointer and argv
Don't check env-pointer values against getenv() as they might differ:
When launching the program from e.g. bash with `temp=bar`then there is
TEMP and temp in the list (env-pointer) but getenv/GetEnvironmentVariable
is case insensitive picking up the first matching value.
On AzP the test fails due to BUILD_REQUESTEDFOREMAIL= being in the env
pointer but not in the environment.
On Windows a "set FOO=" UNsets FOO so empty values are likely not part
of the environment, hence don't check via getenv for those.
Add a test including an empty env variable.