fixes to wxZipInputStream EOF (not) handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-06-19 08:10:21 +00:00
parent 4145aa5c05
commit b270f6e30e
3 changed files with 54 additions and 2 deletions

View File

@@ -47,7 +47,7 @@
//#define TEST_LIST
//#define TEST_LOG
//#define TEST_LONGLONG
#define TEST_MIME
//#define TEST_MIME
//#define TEST_INFO_FUNCTIONS
//#define TEST_SOCKETS
//#define TEST_STRINGS
@@ -55,6 +55,7 @@
//#define TEST_TIMER
//#define TEST_VCARD
//#define TEST_WCHAR
#define TEST_ZIP
// ----------------------------------------------------------------------------
// test class for container objects
@@ -1576,6 +1577,33 @@ static void TestUtf8()
#endif // TEST_WCHAR
// ----------------------------------------------------------------------------
// ZIP stream
// ----------------------------------------------------------------------------
#ifdef TEST_ZIP
#include "wx/zipstrm.h"
static void TestZipStreamRead()
{
puts("*** Testing ZIP reading ***\n");
wxZipInputStream istr(_T("idx.zip"), _T("IDX.txt"));
printf("Archive size: %u\n", istr.GetSize());
puts("Dumping the file:");
while ( !istr.Eof() )
{
putchar(istr.GetC());
fflush(stdout);
}
puts("\n----- done ------");
}
#endif // TEST_ZIP
// ----------------------------------------------------------------------------
// date time
// ----------------------------------------------------------------------------
@@ -3454,6 +3482,10 @@ int main(int argc, char **argv)
TestUtf8();
#endif // TEST_WCHAR
#ifdef TEST_ZIP
TestZipStreamRead();
#endif // TEST_ZIP
wxUninitialize();
return 0;