aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/test_nsfe.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-08-14 22:32:03 +0000
committerChristian Grothoff <christian@grothoff.org>2012-08-14 22:32:03 +0000
commitb7382eee137f67f959da59912d5d9b9e5587e834 (patch)
tree529c76bb6a9baa4c027ea134c9f2ea18388f80e3 /src/plugins/test_nsfe.c
parentdc0861ada7e0bdd8754b86bcb0dc533ca1df02d2 (diff)
downloadlibextractor-b7382eee137f67f959da59912d5d9b9e5587e834.tar.gz
libextractor-b7382eee137f67f959da59912d5d9b9e5587e834.zip
nsfe testcase and nsfe fixes
Diffstat (limited to 'src/plugins/test_nsfe.c')
-rw-r--r--src/plugins/test_nsfe.c133
1 files changed, 133 insertions, 0 deletions
diff --git a/src/plugins/test_nsfe.c b/src/plugins/test_nsfe.c
new file mode 100644
index 0000000..7e4e5cd
--- /dev/null
+++ b/src/plugins/test_nsfe.c
@@ -0,0 +1,133 @@
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_nsfe.c
22 * @brief testcase for nsfe plugin
23 * @author Christian Grothoff
24 */
25#include "platform.h"
26#include "test_lib.h"
27
28
29
30/**
31 * Main function for the NSFE testcase.
32 *
33 * @param argc number of arguments (ignored)
34 * @param argv arguments (ignored)
35 * @return 0 on success
36 */
37int
38main (int argc, char *argv[])
39{
40 struct SolutionData nsfe_classics_sol[] =
41 {
42 {
43 EXTRACTOR_METATYPE_MIMETYPE,
44 EXTRACTOR_METAFORMAT_UTF8,
45 "text/plain",
46 "audio/x-nsfe",
47 strlen ("audio/x-nsfe") + 1,
48 0
49 },
50 {
51 EXTRACTOR_METATYPE_SONG_COUNT,
52 EXTRACTOR_METAFORMAT_UTF8,
53 "text/plain",
54 "2",
55 strlen ("2") + 1,
56 0
57 },
58 {
59 EXTRACTOR_METATYPE_STARTING_SONG,
60 EXTRACTOR_METAFORMAT_UTF8,
61 "text/plain",
62 "0",
63 strlen ("0") + 1,
64 0
65 },
66 {
67 EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM,
68 EXTRACTOR_METAFORMAT_UTF8,
69 "text/plain",
70 "PAL",
71 strlen ("PAL") + 1,
72 0
73 },
74 {
75 EXTRACTOR_METATYPE_ALBUM,
76 EXTRACTOR_METAFORMAT_UTF8,
77 "text/plain",
78 "Adventures of Dr. Franken,The",
79 strlen ("Adventures of Dr. Franken,The") + 1,
80 0
81 },
82 {
83 EXTRACTOR_METATYPE_ARTIST,
84 EXTRACTOR_METAFORMAT_UTF8,
85 "text/plain",
86 "Mark Cooksey",
87 strlen ("Mark Cooksey") + 1,
88 0
89 },
90 {
91 EXTRACTOR_METATYPE_COPYRIGHT,
92 EXTRACTOR_METAFORMAT_UTF8,
93 "text/plain",
94 "1993 Motivetime LTD.",
95 strlen ("1993 Motivetime LTD.") + 1,
96 0
97 },
98 {
99 EXTRACTOR_METATYPE_RIPPER,
100 EXTRACTOR_METAFORMAT_UTF8,
101 "text/plain",
102 "Gil_Galad",
103 strlen ("Gil_Galad") + 1,
104 0
105 },
106 {
107 EXTRACTOR_METATYPE_TITLE,
108 EXTRACTOR_METAFORMAT_UTF8,
109 "text/plain",
110 "Bach: Prelude & Fugue In C Minor",
111 strlen ("Bach: Prelude & Fugue In C Minor") + 1,
112 0
113 },
114 {
115 EXTRACTOR_METATYPE_TITLE,
116 EXTRACTOR_METAFORMAT_UTF8,
117 "text/plain",
118 "Beethoven: Moonlight Sonata",
119 strlen ("Beethoven: Moonlight Sonata") + 1,
120 0
121 },
122 { 0, 0, NULL, NULL, 0, -1 }
123 };
124 struct ProblemSet ps[] =
125 {
126 { "testdata/nsfe_classics.nsfe",
127 nsfe_classics_sol },
128 { NULL, NULL }
129 };
130 return ET_main ("nsfe", ps);
131}
132
133/* end of test_nsfe.c */