Fix wxFileName unit test under Unix after recent changes

Don't use GetVolumeSeparator() to combine UNC or GUID volumes with
paths, this doesn't work because this kind of paths doesn't contain
colons at all.

Update the documentation to mention this.
This commit is contained in:
Vadim Zeitlin
2021-09-15 13:10:25 +02:00
parent e8629db48a
commit ed19e5625b
2 changed files with 11 additions and 1 deletions

View File

@@ -169,7 +169,9 @@ TEST_CASE("wxFileName::Construction", "[filename]")
// if the test is run from root directory or its direct subdirectory
CHECK( fn.Normalize(wxPATH_NORM_ALL, "/foo/bar/baz", fni.format) );
if ( *fni.volume && *fni.path )
// restrict this check to drive letter volumes as UNC and GUID volumes
// can't be combined with the path using the volume separator
if ( strlen(fni.volume) == 1 && *fni.path )
{
// check that specifying the volume separately or as part of the
// path doesn't make any difference