Add convenient wxFileName::GetAbsolutePath() wrapper and use it

This wrapper simply combines the calls to MakeAbsolute() and
GetFullPath(), but using it results in shorter and more clear code, so
it seems to be worth having.
This commit is contained in:
Vadim Zeitlin
2021-07-11 14:48:57 +01:00
parent 3539a81a8a
commit f37d449208
14 changed files with 38 additions and 49 deletions

View File

@@ -356,6 +356,11 @@ TEST_CASE("wxFileName::Normalize", "[filename]")
);
}
// Check that paths are made absolute, but environment variables are not
// expanded in them.
CHECK( wxFileName(pathWithEnvVar).GetAbsolutePath()
== wxFileName(wxGetCwd() + "/" + pathWithEnvVar).GetFullPath() );
// MSW-only test for wxPATH_NORM_LONG: notice that we only run it if short
// names generation is not disabled for this system as otherwise the file
// MKINST~1 doesn't exist at all and normalizing it fails (it's possible