From: Vadim Zeitlin Date: Thu, 2 Nov 2006 01:48:38 +0000 (+0000) Subject: close the file before removing it X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5df663afecdfe2db0447064ea64a4dd8ecbbf889 close the file before removing it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 945201f3b1..a151a12468 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -88,7 +88,7 @@ #define TEST_WCHAR #define TEST_ZIP #else // #if TEST_ALL - #define TEST_INFO_FUNCTIONS + #define TEST_CMDLINE #endif // some tests are interactive, define this to run them @@ -136,7 +136,7 @@ static wxString MakePrintable(const wxChar *s) static void ShowCmdLine(const wxCmdLineParser& parser) { - wxString s = _T("Input files: "); + wxString s = _T("Command line parsed successfully:\nInput files: "); size_t count = parser.GetParamCount(); for ( size_t param = 0; param < count; param++ ) @@ -2814,11 +2814,13 @@ static void TestFileStream() fsOut.Write("foo", 3); } - wxFileInputStream fsIn(filename); - wxPrintf(_T("File stream size: %u\n"), fsIn.GetSize()); - while ( !fsIn.Eof() ) { - wxPutchar(fsIn.GetC()); + wxFileInputStream fsIn(filename); + wxPrintf(_T("File stream size: %u\n"), fsIn.GetSize()); + while ( !fsIn.Eof() ) + { + wxPutchar(fsIn.GetC()); + } } if ( !wxRemoveFile(filename) )