test/paths: skip normalize tests if pathcch library is not available

If pathcch is not available paths are not normalized on Windows.

Fixes tests on ancient mingw.
This commit is contained in:
Kacper Michajłow 2024-05-22 01:32:08 +02:00
parent 734846c123
commit 4caca3e6c0
1 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,10 @@ int main(void)
TEST_NORMALIZE("/foo", "/foo");
#endif
#if defined(_WIN32) && (!defined(HAVE_PATHCCH) || !HAVE_PATHCCH)
return 0;
#endif
void *ctx = talloc_new(NULL);
bstr dst = bstr0(mp_getcwd(ctx));
bstr_xappend(ctx, &dst, bstr0("/foo"));