X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f302e75338c6d383a939fc82d42f44b60689e77..67a083dd38d1ad1df8c6a25a58bb2f0ec4f3a936:/tests/filename/filenametest.cpp?ds=sidebyside diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index 27ad3ae870..969b34d8d3 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -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++ )