]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/filesys/filesys.cpp
Documentation patch from Olly Betts
[wxWidgets.git] / tests / filesys / filesys.cpp
index 05c9458b702806806164db9fb525ad032380ef1d..90ade21d31373fb8a8c601c6741c22f80ad60482 100644 (file)
@@ -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