Fix unit test added in r62561 to work under Windows too.

The unit test checking that slashes were allowed in UNCs too didn't work under
Windows because GetPath() returned volume as part of the path there (and also
used backslashes by default), fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-11-09 18:20:05 +00:00
parent d4953dd469
commit acaa833787

View File

@@ -500,10 +500,10 @@ void FileNameTestCase::TestUNC()
{ {
wxFileName fn("//share/path/name.ext", wxPATH_DOS); wxFileName fn("//share/path/name.ext", wxPATH_DOS);
CPPUNIT_ASSERT_EQUAL( "share", fn.GetVolume() ); CPPUNIT_ASSERT_EQUAL( "share", fn.GetVolume() );
CPPUNIT_ASSERT_EQUAL( "/path", fn.GetPath() ); CPPUNIT_ASSERT_EQUAL( "\\path", fn.GetPath(wxPATH_NO_SEPARATOR, wxPATH_DOS) );
fn.Assign("\\\\share2\\path2\\name.ext", wxPATH_DOS); fn.Assign("\\\\share2\\path2\\name.ext", wxPATH_DOS);
CPPUNIT_ASSERT_EQUAL( "share2", fn.GetVolume() ); CPPUNIT_ASSERT_EQUAL( "share2", fn.GetVolume() );
CPPUNIT_ASSERT_EQUAL( "/path2", fn.GetPath() ); CPPUNIT_ASSERT_EQUAL( "\\path2", fn.GetPath(wxPATH_NO_SEPARATOR, wxPATH_DOS) );
} }