libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 8c3f5c39c73a2317a7bcf33f715d62a1c0eefc37
parent 4aa9b1bbf7f5b2e71e3533271b1c061c729f1872
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 19 Aug 2012 19:00:31 +0000

test for riff/ms-video/avi

Diffstat:
Msrc/plugins/Makefile.am | 6++++++
Asrc/plugins/test_riff.c | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/plugins/testdata/riff_flame.avi | 0
3 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am @@ -178,6 +178,7 @@ check_PROGRAMS = \ test_odf \ test_ps \ test_png \ + test_riff \ test_s3m \ test_wav \ test_xm \ @@ -458,6 +459,11 @@ libextractor_riff_la_SOURCES = \ libextractor_riff_la_LDFLAGS = \ $(PLUGINFLAGS) +test_riff_SOURCES = \ + test_riff.c +test_riff_LDADD = \ + $(top_builddir)/src/plugins/libtest.la + libextractor_rpm_la_SOURCES = \ rpm_extractor.c diff --git a/src/plugins/test_riff.c b/src/plugins/test_riff.c @@ -0,0 +1,77 @@ +/* + This file is part of libextractor. + (C) 2012 Vidyut Samanta and Christian Grothoff + + libextractor is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + libextractor is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libextractor; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +/** + * @file plugins/test_riff.c + * @brief testcase for riff plugin + * @author Christian Grothoff + */ +#include "platform.h" +#include "test_lib.h" + + + +/** + * Main function for the RIFF testcase. + * + * @param argc number of arguments (ignored) + * @param argv arguments (ignored) + * @return 0 on success + */ +int +main (int argc, char *argv[]) +{ + struct SolutionData riff_flame_sol[] = + { + { + EXTRACTOR_METATYPE_MIMETYPE, + EXTRACTOR_METAFORMAT_UTF8, + "text/plain", + "video/x-msvideo", + strlen ("video/x-msvideo") + 1, + 0 + }, + { + EXTRACTOR_METATYPE_FORMAT, + EXTRACTOR_METAFORMAT_UTF8, + "text/plain", + "codec: cvid, 35 fps, 3143 ms", + strlen ("codec: cvid, 35 fps, 3143 ms") + 1, + 0 + }, + { + EXTRACTOR_METATYPE_IMAGE_DIMENSIONS, + EXTRACTOR_METAFORMAT_UTF8, + "text/plain", + "256x240", + strlen ("256x240") + 1, + 0 + }, + { 0, 0, NULL, NULL, 0, -1 } + }; + struct ProblemSet ps[] = + { + { "testdata/riff_flame.avi", + riff_flame_sol }, + { NULL, NULL } + }; + return ET_main ("riff", ps); +} + +/* end of test_riff.c */ diff --git a/src/plugins/testdata/riff_flame.avi b/src/plugins/testdata/riff_flame.avi Binary files differ.