Fix for specific filename syntax of OpenVMS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jouk Jansen 2012-11-07 09:00:25 +00:00
parent 295683b22f
commit 67b09eacea

View File

@ -702,13 +702,15 @@ void FileNameTestCase::TestExists()
CPPUNIT_ASSERT( wxFileName::Exists("/dev/core", wxFILE_EXISTS_SYMLINK) ); CPPUNIT_ASSERT( wxFileName::Exists("/dev/core", wxFILE_EXISTS_SYMLINK) );
CPPUNIT_ASSERT( wxFileName::Exists("/dev/log", wxFILE_EXISTS_SOCKET) ); CPPUNIT_ASSERT( wxFileName::Exists("/dev/log", wxFILE_EXISTS_SOCKET) );
#endif // __LINUX__ #endif // __LINUX__
#ifndef __VMS
wxString fifo = dirTemp.GetPath() + "/fifo"; wxString fifo = dirTemp.GetPath() + "/fifo";
if (mkfifo(fifo.c_str(), 0600) == 0) if (mkfifo(fifo.c_str(), 0600) == 0)
{ {
wxON_BLOCK_EXIT1(wxRemoveFile, fifo); wxON_BLOCK_EXIT1(wxRemoveFile, fifo);
CPPUNIT_ASSERT( wxFileName::Exists(fifo, wxFILE_EXISTS_FIFO) ); CPPUNIT_ASSERT( wxFileName::Exists(fifo, wxFILE_EXISTS_FIFO) );
} }
#endif
#endif // __UNIX__ #endif // __UNIX__
} }
@ -773,9 +775,15 @@ void FileNameTestCase::TestSymlinks()
CPPUNIT_ASSERT(tmpfn.GetTimes(&dtAccessTmp, &dtModTmp, &dtCreateTmp)); CPPUNIT_ASSERT(tmpfn.GetTimes(&dtAccessTmp, &dtModTmp, &dtCreateTmp));
// Create a temporary directory // Create a temporary directory
#ifdef __VMS
wxString name = tmpdir + ".filenametestXXXXXX]";
mkdir( name.char_str() , 0222 );
wxString tempdir = name;
#else
wxString name = tmpdir + "/filenametestXXXXXX"; wxString name = tmpdir + "/filenametestXXXXXX";
wxString tempdir = wxString::From8BitData(mkdtemp(name.char_str())); wxString tempdir = wxString::From8BitData(mkdtemp(name.char_str()));
tempdir << wxFileName::GetPathSeparator(); tempdir << wxFileName::GetPathSeparator();
#endif
wxFileName tempdirfn(wxFileName::DirName(tempdir)); wxFileName tempdirfn(wxFileName::DirName(tempdir));
CPPUNIT_ASSERT(tempdirfn.DirExists()); CPPUNIT_ASSERT(tempdirfn.DirExists());