X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20f46e8dc8ba9246f7174e9d9153f61282f53a07..34621cc5d6eaf8933935fbda55625124429a0ff9:/tests/filesys/filesys.cpp diff --git a/tests/filesys/filesys.cpp b/tests/filesys/filesys.cpp index 05c9458b70..90ade21d31 100644 --- a/tests/filesys/filesys.cpp +++ b/tests/filesys/filesys.cpp @@ -62,9 +62,11 @@ public: private: CPPUNIT_TEST_SUITE( FileSystemTestCase ); CPPUNIT_TEST( UrlParsing ); + CPPUNIT_TEST( FileNameToUrlConversion ); CPPUNIT_TEST_SUITE_END(); void UrlParsing(); + void FileNameToUrlConversion(); DECLARE_NO_COPY_CLASS(FileSystemTestCase) }; @@ -110,5 +112,15 @@ void FileSystemTestCase::UrlParsing() 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