Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 : : *
5 : : * The contents of this file are subject to the Mozilla Public License Version
6 : : * 1.1 (the "License"); you may not use this file except in compliance with
7 : : * the License. You may obtain a copy of the License at
8 : : * http://www.mozilla.org/MPL/
9 : : *
10 : : * Software distributed under the License is distributed on an "AS IS" basis,
11 : : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : : * for the specific language governing rights and limitations under the
13 : : * License.
14 : : *
15 : : * The Initial Developer of the Original Code is
16 : : * Caolán McNamara <caolanm@redhat.com>
17 : : * Portions created by the Initial Developer are Copyright (C) 2011 the
18 : : * Initial Developer. All Rights Reserved.
19 : : *
20 : : * Contributor(s):
21 : : * Caolán McNamara <caolanm@redhat.com>
22 : : *
23 : : * Alternatively, the contents of this file may be used under the terms of
24 : : * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
25 : : * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
26 : : * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
27 : : * instead of those above.
28 : : */
29 : :
30 : : #include <rtl/ustring.hxx>
31 : : #include "unotest/detail/unotestdllapi.hxx"
32 : :
33 : : namespace test {
34 : :
35 : : enum filterStatus
36 : : {
37 : : fail = 0,
38 : : pass = 1,
39 : : indeterminate = 2
40 : : };
41 : :
42 : : /*
43 : : * NOTE, any files beginning with CVE-, BID- or EDB- will be assumed to be
44 : : * encrypted using arcfour with key 0x435645, this is to silence panicky
45 : : * virus/malware-checkers
46 : : *
47 : : * e.g. m[de]crypt --bare -a arcfour -o hex -k 435645 -s 3
48 : : */
49 : : /* Implementation of Filters test */
50 : 165 : class OOO_DLLPUBLIC_UNOTEST FiltersTest
51 : : {
52 : : public:
53 : : void testDir(
54 : : //filter name
55 : : const rtl::OUString &rFilter,
56 : : //root dir of test files, must contain pass, fail, indeterminate
57 : : const rtl::OUString &rURL,
58 : : //additional filter data for SfxFilter
59 : : const rtl::OUString &rUserData);
60 : :
61 : : virtual bool load(
62 : : const rtl::OUString &rFilter,
63 : : const rtl::OUString &rURL,
64 : : const rtl::OUString &rUserData) = 0;
65 : :
66 : : protected:
67 : 165 : ~FiltersTest() {}
68 : :
69 : : void recursiveScan(
70 : : const rtl::OUString &rFilter,
71 : : const rtl::OUString &rURL,
72 : : const rtl::OUString &rUserData,
73 : : filterStatus nExpected);
74 : : };
75 : :
76 : : }
77 : :
78 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|