]>
git.saurik.com Git - wxWidgets.git/blob - tests/archive/tartest.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/tartest.cpp
3 // Purpose: Test the tar classes
4 // Author: Mike Wetherell
6 // Copyright: (c) 2004 Mike Wetherell
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
22 #include "archivetest.h"
23 #include "wx/tarstrm.h"
28 ///////////////////////////////////////////////////////////////////////////////
31 class tartest
: public ArchiveTestSuite
35 static CppUnit::Test
*suite() { return (new tartest
)->makeSuite(); }
38 CppUnit::Test
*makeTest(string descr
, int options
,
39 bool genericInterface
,
40 const wxString
& archiver
,
41 const wxString
& unarchiver
);
45 : ArchiveTestSuite("tar")
47 AddArchiver(_T("tar cf %s *"));
48 AddUnArchiver(_T("tar xf %s"));
51 CppUnit::Test
*tartest::makeTest(
54 bool genericInterface
,
55 const wxString
& archiver
,
56 const wxString
& unarchiver
)
58 if ((options
& Stub
) && (options
& PipeIn
) == 0)
63 return new ArchiveTestCase
<wxArchiveClassFactory
>(
64 descr
, new wxTarClassFactory
,
65 options
, archiver
, unarchiver
);
68 return new ArchiveTestCase
<wxTarClassFactory
>(
69 descr
, new wxTarClassFactory
,
70 options
, archiver
, unarchiver
);
73 CPPUNIT_TEST_SUITE_REGISTRATION(tartest
);
74 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(tartest
, "archive");
75 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(tartest
, "archive/tar");
77 #endif // wxUSE_STREAMS