]>
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
5 // Copyright: (c) 2004 Mike Wetherell
6 // Licence: wxWindows licence
7 ///////////////////////////////////////////////////////////////////////////////
21 #include "archivetest.h"
22 #include "wx/tarstrm.h"
27 ///////////////////////////////////////////////////////////////////////////////
30 class tartest
: public ArchiveTestSuite
34 static CppUnit::Test
*suite() { return (new tartest
)->makeSuite(); }
37 CppUnit::Test
*makeTest(string descr
, int options
,
38 bool genericInterface
,
39 const wxString
& archiver
,
40 const wxString
& unarchiver
);
44 : ArchiveTestSuite("tar")
46 AddArchiver(wxT("tar cf %s *"));
47 AddUnArchiver(wxT("tar xf %s"));
50 CppUnit::Test
*tartest::makeTest(
53 bool genericInterface
,
54 const wxString
& archiver
,
55 const wxString
& unarchiver
)
57 if ((options
& Stub
) && (options
& PipeIn
) == 0)
62 return new ArchiveTestCase
<wxArchiveClassFactory
>(
63 descr
, new wxTarClassFactory
,
64 options
, archiver
, unarchiver
);
67 return new ArchiveTestCase
<wxTarClassFactory
>(
68 descr
, new wxTarClassFactory
,
69 options
, archiver
, unarchiver
);
72 CPPUNIT_TEST_SUITE_REGISTRATION(tartest
);
73 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(tartest
, "archive");
74 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(tartest
, "archive/tar");
76 #endif // wxUSE_STREAMS