]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/uris/uris.cpp
fixed ToString() for negative long longs (bug 1101426)
[wxWidgets.git] / tests / uris / uris.cpp
index 8068f4ef53e0e9b5e16bac2f21e05bde7aa518da..193beca20a6a7ff520f17734e2dd21c767adc33d 100644 (file)
@@ -11,7 +11,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#include "wx/wxprec.h"
+#include "testprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
 #include "wx/uri.h"
 #include "wx/url.h"
 
-#include "wx/cppunit.h"
-
 // Test wxURL & wxURI compat?
-#define TEST_URL ( 1 && wxUSE_URL )
+#define TEST_URL ( 0 && wxUSE_URL )
 
 // ----------------------------------------------------------------------------
 // test class
@@ -309,6 +307,13 @@ void URITestCase::URLCompat()
 #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") );
 }
 
 #endif