]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/filename/filename.cpp
fixed handlers registration in DoPopupMenu (patch 1009949)
[wxWidgets.git] / tests / filename / filename.cpp
index 87fa39e7081927b450991b4f7c396467a9d1921d..093a344f3d9a51e7b08dedd6f7af2eba8f531408 100644 (file)
@@ -88,6 +88,7 @@ private:
     CPPUNIT_TEST_SUITE( FileNameTestCase );
         CPPUNIT_TEST( TestConstruction );
         CPPUNIT_TEST( TestSplit );
+        CPPUNIT_TEST( TestSetPath );
     CPPUNIT_TEST_SUITE_END();
 
     void TestConstruction();
@@ -134,3 +135,14 @@ void FileNameTestCase::TestSplit()
     }
 }
 
+void FileNameTestCase::TestSetPath()
+{
+    wxFileName fn(_T("d:\\test\\foo.bar"), wxPATH_DOS);
+    fn.SetPath(_T("c:\\temp"));
+    CPPUNIT_ASSERT( fn == _T("c:\\temp\\foo.bar") );
+
+    fn = _T("/usr/bin/ls");
+    fn.SetPath(_T("/usr/local/bin"));
+    CPPUNIT_ASSERT( fn == _T("/usr/local/bin/ls") );
+}
+