aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-08-19 19:00:31 +0000
committerChristian Grothoff <christian@grothoff.org>2012-08-19 19:00:31 +0000
commit8c3f5c39c73a2317a7bcf33f715d62a1c0eefc37 (patch)
tree55f0f313f8c798b457f7014429bcad4136f06d43
parent4aa9b1bbf7f5b2e71e3533271b1c061c729f1872 (diff)
downloadlibextractor-8c3f5c39c73a2317a7bcf33f715d62a1c0eefc37.tar.gz
libextractor-8c3f5c39c73a2317a7bcf33f715d62a1c0eefc37.zip
test for riff/ms-video/avi
-rw-r--r--src/plugins/Makefile.am6
-rw-r--r--src/plugins/test_riff.c77
-rw-r--r--src/plugins/testdata/riff_flame.avibin0 -> 289280 bytes
3 files changed, 83 insertions, 0 deletions
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index b03e307..5093003 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -178,6 +178,7 @@ check_PROGRAMS = \
178 test_odf \ 178 test_odf \
179 test_ps \ 179 test_ps \
180 test_png \ 180 test_png \
181 test_riff \
181 test_s3m \ 182 test_s3m \
182 test_wav \ 183 test_wav \
183 test_xm \ 184 test_xm \
@@ -458,6 +459,11 @@ libextractor_riff_la_SOURCES = \
458libextractor_riff_la_LDFLAGS = \ 459libextractor_riff_la_LDFLAGS = \
459 $(PLUGINFLAGS) 460 $(PLUGINFLAGS)
460 461
462test_riff_SOURCES = \
463 test_riff.c
464test_riff_LDADD = \
465 $(top_builddir)/src/plugins/libtest.la
466
461 467
462libextractor_rpm_la_SOURCES = \ 468libextractor_rpm_la_SOURCES = \
463 rpm_extractor.c 469 rpm_extractor.c
diff --git a/src/plugins/test_riff.c b/src/plugins/test_riff.c
new file mode 100644
index 0000000..65144ce
--- /dev/null
+++ b/src/plugins/test_riff.c
@@ -0,0 +1,77 @@
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_riff.c
22 * @brief testcase for riff plugin
23 * @author Christian Grothoff
24 */
25#include "platform.h"
26#include "test_lib.h"
27
28
29
30/**
31 * Main function for the RIFF 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 riff_flame_sol[] =
41 {
42 {
43 EXTRACTOR_METATYPE_MIMETYPE,
44 EXTRACTOR_METAFORMAT_UTF8,
45 "text/plain",
46 "video/x-msvideo",
47 strlen ("video/x-msvideo") + 1,
48 0
49 },
50 {
51 EXTRACTOR_METATYPE_FORMAT,
52 EXTRACTOR_METAFORMAT_UTF8,
53 "text/plain",
54 "codec: cvid, 35 fps, 3143 ms",
55 strlen ("codec: cvid, 35 fps, 3143 ms") + 1,
56 0
57 },
58 {
59 EXTRACTOR_METATYPE_IMAGE_DIMENSIONS,
60 EXTRACTOR_METAFORMAT_UTF8,
61 "text/plain",
62 "256x240",
63 strlen ("256x240") + 1,
64 0
65 },
66 { 0, 0, NULL, NULL, 0, -1 }
67 };
68 struct ProblemSet ps[] =
69 {
70 { "testdata/riff_flame.avi",
71 riff_flame_sol },
72 { NULL, NULL }
73 };
74 return ET_main ("riff", ps);
75}
76
77/* end of test_riff.c */
diff --git a/src/plugins/testdata/riff_flame.avi b/src/plugins/testdata/riff_flame.avi
new file mode 100644
index 0000000..e8e96e3
--- /dev/null
+++ b/src/plugins/testdata/riff_flame.avi
Binary files differ