From: Vadim Zeitlin Date: Mon, 9 Nov 2009 18:20:05 +0000 (+0000) Subject: Fix unit test added in r62561 to work under Windows too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/acaa833787f4e7ae6d19ac98da1f2b3f3969fedf 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 --- diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index 8039d2f80b..70d3dced98 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -500,10 +500,10 @@ void FileNameTestCase::TestUNC() { wxFileName fn("//share/path/name.ext", wxPATH_DOS); 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); CPPUNIT_ASSERT_EQUAL( "share2", fn.GetVolume() ); - CPPUNIT_ASSERT_EQUAL( "/path2", fn.GetPath() ); + CPPUNIT_ASSERT_EQUAL( "\\path2", fn.GetPath(wxPATH_NO_SEPARATOR, wxPATH_DOS) ); }