git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43050
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#define TEST_WCHAR
#define TEST_ZIP
#else // #if TEST_ALL
- #define TEST_CMDLINE
+ #define TEST_FILE
#endif
// some tests are interactive, define this to run them
wxPuts(wxEmptyString);
}
+static void TestTempFile()
+{
+ wxPuts(_T("*** wxTempFile test ***"));
+
+ wxTempFile tmpFile;
+ if ( tmpFile.Open(_T("test2")) && tmpFile.Write(_T("the answer is 42")) )
+ {
+ if ( tmpFile.Commit() )
+ wxPuts(_T("File committed."));
+ else
+ wxPuts(_T("ERROR: could't commit temp file."));
+
+ wxRemoveFile(_T("test2"));
+ }
+
+ wxPuts(wxEmptyString);
+}
+
#endif // TEST_FILE
// ----------------------------------------------------------------------------
TestFileRead();
TestTextFileRead();
TestFileCopy();
+ TestTempFile();
#endif // TEST_FILE
#ifdef TEST_FILENAME