+
+#if TEST_URL
+
+#include "wx/url.h"
+
+void URITestCase::URLCompat()
+{
+ wxURL url(wxT("http://user:password@wxwidgets.org"));
+
+ CPPUNIT_ASSERT(url.GetError() == wxURL_NOERR);
+
+ wxInputStream* pInput = url.GetInputStream();
+
+ CPPUNIT_ASSERT( pInput != NULL );
+
+ CPPUNIT_ASSERT( url == wxURL(wxT("http://user:password@wxwidgets.org")) );
+
+ wxURI uri(wxT("http://user:password@wxwidgets.org"));
+
+ CPPUNIT_ASSERT( url == uri );
+
+ wxURL urlcopy(uri);
+
+ CPPUNIT_ASSERT( urlcopy == url );
+ CPPUNIT_ASSERT( urlcopy == uri );
+
+ wxURI uricopy(url);
+
+ CPPUNIT_ASSERT( uricopy == url );
+ CPPUNIT_ASSERT( uricopy == urlcopy );
+ CPPUNIT_ASSERT( uricopy == uri );
+#if WXWIN_COMPATIBILITY_2_4
+ CPPUNIT_ASSERT( wxURL::ConvertFromURI(wxT("%20%41%20")) == wxT(" A ") );
+#endif
+ CPPUNIT_ASSERT( wxURI::Unescape(wxT("%20%41%20")) == wxT(" A ") );
+
+ wxURI test(wxT("file:\"myf\"ile.txt"));
+
+ CPPUNIT_ASSERT( test.BuildURI() == wxT("file:%22myf%22ile.txt") );
+ CPPUNIT_ASSERT( test.GetScheme() == wxT("file") );
+ CPPUNIT_ASSERT( test.GetPath() == wxT("%22myf%22ile.txt") );
+}
+
+#if wxUSE_PROTOCOL_HTTP
+void URITestCase::URLProxy()
+{
+ wxURL url(wxT("http://www.asite.com/index.html"));
+ url.SetProxy(wxT("pserv:3122"));
+}
+#endif // wxUSE_PROTOCOL_HTTP
+#endif
+