X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2264775b8abfa8ad030029cd55d308aec50cbe67..c8743553a137e13f8e66ff191c8da9b34cc62b8f:/tests/filename/filenametest.cpp diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index e87c50a66b..889b28262c 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -144,10 +144,13 @@ void FileNameTestCase::TestConstruction() wxString fullname = fn.GetFullPath(fni.format); CPPUNIT_ASSERT_EQUAL( wxString(fni.fullname), fullname ); + // notice that we use a dummy working directory to ensure that paths + // with "../.." in them could be normalized, otherwise this would fail + // if the test is run from root directory or its direct subdirectory CPPUNIT_ASSERT_MESSAGE ( wxString::Format("Normalize(%s) failed", fni.fullname).c_str(), - fn.Normalize(wxPATH_NORM_ALL, _T(""), fni.format) + fn.Normalize(wxPATH_NORM_ALL, _T("/foo/bar/baz"), fni.format) ); if ( *fni.volume && *fni.path )