Added wxFileName::Exists().
This function checks for existence of anything with the given name, not necessarily just a file or a directory. Extend the unit test to verify that it returns true for /dev/null on Unix systems. Closes #953. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -657,13 +657,16 @@ void FileNameTestCase::TestExists()
|
||||
|
||||
CPPUNIT_ASSERT( fn.FileExists() );
|
||||
CPPUNIT_ASSERT( !wxFileName::DirExists(fn.GetFullPath()) );
|
||||
CPPUNIT_ASSERT( fn.Exists() );
|
||||
|
||||
wxFileName dirTemp(wxFileName::DirName(wxFileName::GetTempDir()));
|
||||
CPPUNIT_ASSERT( !dirTemp.FileExists() );
|
||||
CPPUNIT_ASSERT( dirTemp.DirExists() );
|
||||
CPPUNIT_ASSERT( dirTemp.Exists() );
|
||||
|
||||
#ifdef __UNIX__
|
||||
CPPUNIT_ASSERT( !wxFileName::FileExists("/dev/null") );
|
||||
CPPUNIT_ASSERT( !wxFileName::DirExists("/dev/null") );
|
||||
CPPUNIT_ASSERT( wxFileName::Exists("/dev/null") );
|
||||
#endif // __UNIX__
|
||||
}
|
||||
|
Reference in New Issue
Block a user