X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9e994615409e36d441135e4fa0761cf0398a2aa..8329fea8ad89a4df6c2f0441facdc5ad189473ea:/tests/filename/filenametest.cpp diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index f91ab53ee4..25ffc3be01 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -11,7 +11,7 @@ // headers // ---------------------------------------------------------------------------- -#include "wx/wxprec.h" +#include "testprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -22,8 +22,6 @@ #include "wx/filename.h" -#include "wx/cppunit.h" - // ---------------------------------------------------------------------------- // test data // ---------------------------------------------------------------------------- @@ -116,6 +114,20 @@ void FileNameTestCase::TestConstruction() CPPUNIT_ASSERT( fullname == fni.fullname ); CPPUNIT_ASSERT( fn.Normalize(wxPATH_NORM_ALL, _T(""), fni.format) ); + + if ( *fni.volume && *fni.path ) + { + // check that specifying the volume separately or as part of the + // path doesn't make any difference + wxString pathWithVolume = fni.volume; + pathWithVolume += wxFileName::GetVolumeSeparator(fni.format); + pathWithVolume += fni.path; + + CPPUNIT_ASSERT( fn == wxFileName(pathWithVolume, + fni.name, + fni.ext, + fni.format) ); + } } }