The final assertion opened a generator expression and never closed it.
file(GENERATE) passes such a string through verbatim rather than
diagnosing it, and the result is a non-empty string, so an assertion
that tests only for truth cannot fail. That case has been vacuous
since it was added.
Close the expression, and compare each result against the exact value
the operation returns rather than against its truthiness, so that a
malformed expression is reported instead of quietly satisfying the
check.
Implements the generator expression $<PATH:MATIVE_PATH> which convert
path(s) into a native format with platform-specific slashes (``\`` on
Windows hosts and ``/`` elsewhere).
Fixes: #26515