]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/filename/filenametest.cpp
[ 1505048 ] wxHtml rendering of underlined text
[wxWidgets.git] / tests / filename / filenametest.cpp
index 27ad3ae8700f531b99bbdca0b995c0787963df6e..969b34d8d38d8fa0fb9a6cc28337e6ac9fc0d65f 100644 (file)
@@ -86,6 +86,7 @@ public:
 private:
     CPPUNIT_TEST_SUITE( FileNameTestCase );
         CPPUNIT_TEST( TestConstruction );
+        CPPUNIT_TEST( TestComparison );
         CPPUNIT_TEST( TestSplit );
         CPPUNIT_TEST( TestSetPath );
         CPPUNIT_TEST( TestStrip );
@@ -95,6 +96,7 @@ private:
     CPPUNIT_TEST_SUITE_END();
 
     void TestConstruction();
+    void TestComparison();
     void TestSplit();
     void TestSetPath();
     void TestStrip();
@@ -140,6 +142,16 @@ void FileNameTestCase::TestConstruction()
     }
 }
 
+void FileNameTestCase::TestComparison()
+{
+    wxFileName fn1(wxT("/tmp/file1"));
+    wxFileName fn2(wxT("/tmp/dir2/../file2"));
+    fn1.Normalize();
+    fn2.Normalize();
+    CPPUNIT_ASSERT(fn1.GetPath() == fn2.GetPath());
+
+}
+
 void FileNameTestCase::TestSplit()
 {
     for ( size_t n = 0; n < WXSIZEOF(filenames); n++ )