]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/filename/filenametest.cpp
More WXDLLIMPEXP_GIZMOS fixes
[wxWidgets.git] / tests / filename / filenametest.cpp
index fe5667b5369c2343440da380a33bde047924a23e..0e9681ee437aab4ce33d6d29b6a70676a565afc2 100644 (file)
@@ -148,6 +148,10 @@ void FileNameTestCase::TestSplit()
         CPPUNIT_ASSERT( name == fni.name );
         CPPUNIT_ASSERT( ext == fni.ext );
     }
+
+    // special case of empty extension
+    wxFileName fn(_T("foo."));
+    CPPUNIT_ASSERT( fn.GetFullPath() == _T("foo.") );
 }
 
 void FileNameTestCase::TestSetPath()
@@ -161,7 +165,7 @@ void FileNameTestCase::TestSetPath()
     CPPUNIT_ASSERT( fn.SameAs(wxFileName(_T("/usr/local/bin/ls"), wxPATH_UNIX)) );
 }
 
-wxString wxGetRealFile(wxString szFile)
+wxString wxTestStripExtension(wxString szFile)
 {
     wxStripExtension(szFile);
     return szFile;
@@ -170,11 +174,11 @@ wxString wxGetRealFile(wxString szFile)
 void FileNameTestCase::TestStrip()
 {
     //test a crash
-    CPPUNIT_ASSERT( wxGetRealFile( _T("") ) == _T("") );
+    CPPUNIT_ASSERT( wxTestStripExtension( _T("") ) == _T("") );
 
     //others
-    CPPUNIT_ASSERT( wxGetRealFile( _T(".") ) == _T("") );
-    CPPUNIT_ASSERT( wxGetRealFile( _T(".wav") ) == _T("") );
-    CPPUNIT_ASSERT( wxGetRealFile( _T("good.wav") ) == _T("good") );
-    CPPUNIT_ASSERT( wxGetRealFile( _T("good.wav.wav") ) == _T("good.wav") );
-}
\ No newline at end of file
+    CPPUNIT_ASSERT( wxTestStripExtension( _T(".") ) == _T("") );
+    CPPUNIT_ASSERT( wxTestStripExtension( _T(".wav") ) == _T("") );
+    CPPUNIT_ASSERT( wxTestStripExtension( _T("good.wav") ) == _T("good") );
+    CPPUNIT_ASSERT( wxTestStripExtension( _T("good.wav.wav") ) == _T("good.wav") );
+}