Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
Add test RunCMake.get_filename_component to cover cases of the command. Remove redundant coverage of these cases from the "complex" tests.