test UNC filenames conversion on MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,9 +62,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
CPPUNIT_TEST_SUITE( FileSystemTestCase );
|
CPPUNIT_TEST_SUITE( FileSystemTestCase );
|
||||||
CPPUNIT_TEST( UrlParsing );
|
CPPUNIT_TEST( UrlParsing );
|
||||||
|
CPPUNIT_TEST( FileNameToUrlConversion );
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
void UrlParsing();
|
void UrlParsing();
|
||||||
|
void FileNameToUrlConversion();
|
||||||
|
|
||||||
DECLARE_NO_COPY_CLASS(FileSystemTestCase)
|
DECLARE_NO_COPY_CLASS(FileSystemTestCase)
|
||||||
};
|
};
|
||||||
@@ -110,5 +112,15 @@ void FileSystemTestCase::UrlParsing()
|
|||||||
CPPUNIT_ASSERT( tst.Anchor(d.url) == d.anchor );
|
CPPUNIT_ASSERT( tst.Anchor(d.url) == d.anchor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileSystemTestCase::FileNameToUrlConversion()
|
||||||
|
{
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
wxFileName fn1(_T("\\\\server\\share\\path\\to\\file"));
|
||||||
|
wxString url1 = wxFileSystem::FileNameToURL(fn1);
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT( fn1.SameAs(wxFileSystem::URLToFileName(url1)) );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_FILESYSTEM
|
#endif // wxUSE_FILESYSTEM
|
||||||
|
Reference in New Issue
Block a user