aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/test_it.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/test_it.c')
-rw-r--r--src/plugins/test_it.c76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/plugins/test_it.c b/src/plugins/test_it.c
new file mode 100644
index 0000000..2ee5a73
--- /dev/null
+++ b/src/plugins/test_it.c
@@ -0,0 +1,76 @@
1/*
2 This file is part of libextractor.
3 (C) 2012 Vidyut Samanta and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20/**
21 * @file plugins/test_it.c
22 * @brief testcase for it plugin
23 * @author Christian Grothoff
24 */
25#include "platform.h"
26#include "test_lib.h"
27
28
29/**
30 * Main function for the IT testcase.
31 *
32 * @param argc number of arguments (ignored)
33 * @param argv arguments (ignored)
34 * @return 0 on success
35 */
36int
37main (int argc, char *argv[])
38{
39 struct SolutionData it_dawn_sol[] =
40 {
41 {
42 EXTRACTOR_METATYPE_MIMETYPE,
43 EXTRACTOR_METAFORMAT_UTF8,
44 "text/plain",
45 "audio/x-mod",
46 strlen ("audio/x-mod") + 1,
47 0
48 },
49 {
50 EXTRACTOR_METATYPE_TITLE,
51 EXTRACTOR_METAFORMAT_C_STRING,
52 "text/plain",
53 "Dawn",
54 strlen ("Dawn") + 1,
55 0
56 },
57 {
58 EXTRACTOR_METATYPE_FORMAT_VERSION,
59 EXTRACTOR_METAFORMAT_C_STRING,
60 "text/plain",
61 "1.2",
62 strlen ("1.2") + 1,
63 0
64 },
65 { 0, 0, NULL, NULL, 0, -1 }
66 };
67 struct ProblemSet ps[] =
68 {
69 { "testdata/it_dawn.it",
70 it_dawn_sol },
71 { NULL, NULL }
72 };
73 return ET_main ("it", ps);
74}
75
76/* end of test_it.c */