]>
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)
62 return new ArchiveTestCase
<wxArchiveClassFactory
>(
63 descr
, new wxTarClassFactory
,
64 options
, archiver
, unarchiver
);
66 return new ArchiveTestCase
<wxTarClassFactory
>(
67 descr
, new wxTarClassFactory
,
68 options
, archiver
, unarchiver
);
71 CPPUNIT_TEST_SUITE_REGISTRATION(tartest
);
72 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(tartest
, "archive");
73 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(tartest
, "archive/tar");
75 #endif // wxUSE_STREAMS