libextractor

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

test_real.c (2665B)


      1 /*
      2      This file is part of libextractor.
      3      Copyright (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., 51 Franklin Street, Fifth Floor,
     18      Boston, MA 02110-1301, USA.
     19 */
     20 /**
     21  * @file plugins/test_real.c
     22  * @brief testcase for real plugin
     23  * @author Christian Grothoff
     24  */
     25 #include "platform.h"
     26 #include "test_lib.h"
     27 
     28 
     29 /**
     30  * Main function for the REAL testcase.
     31  *
     32  * @param argc number of arguments (ignored)
     33  * @param argv arguments (ignored)
     34  * @return 0 on success
     35  */
     36 int
     37 main (int argc, char *argv[])
     38 {
     39   struct SolutionData real_audiosig_sol[] = {
     40     {
     41       EXTRACTOR_METATYPE_MIMETYPE,
     42       EXTRACTOR_METAFORMAT_C_STRING,
     43       "text/plain",
     44       "audio/x-pn-realaudio",
     45       strlen ("audio/x-pn-realaudio") + 1,
     46       0
     47     },
     48     {
     49       EXTRACTOR_METATYPE_TITLE,
     50       EXTRACTOR_METAFORMAT_C_STRING,
     51       "text/plain",
     52       "Welcome!",
     53       strlen ("Welcome!") + 1,
     54       0
     55     },
     56     {
     57       EXTRACTOR_METATYPE_COPYRIGHT,
     58       EXTRACTOR_METAFORMAT_C_STRING,
     59       "text/plain",
     60       "1998, RealNetworks, Inc.",
     61       strlen ("1998, RealNetworks, Inc.") + 1,
     62       0
     63     },
     64     { 0, 0, NULL, NULL, 0, -1 }
     65   };
     66   struct SolutionData real_ra3_sol[] = {
     67     {
     68       EXTRACTOR_METATYPE_MIMETYPE,
     69       EXTRACTOR_METAFORMAT_C_STRING,
     70       "text/plain",
     71       "audio/vnd.rn-realaudio",
     72       strlen ("audio/vnd.rn-realaudio") + 1,
     73       0
     74     },
     75     {
     76       EXTRACTOR_METATYPE_TITLE,
     77       EXTRACTOR_METAFORMAT_C_STRING,
     78       "text/plain",
     79       "Song of Welcome",
     80       strlen ("Song of Welcome") + 1,
     81       0
     82     },
     83     {
     84       EXTRACTOR_METATYPE_AUTHOR_NAME,
     85       EXTRACTOR_METAFORMAT_C_STRING,
     86       "text/plain",
     87       "Investiture Service",
     88       strlen ("Investiture Service") + 1,
     89       0
     90     },
     91     { 0, 0, NULL, NULL, 0, -1 }
     92   };
     93   struct ProblemSet ps[] = {
     94     { "testdata/audiosig.rm",
     95       real_audiosig_sol },
     96     { "testdata/ra3.ra",
     97       real_ra3_sol },
     98     { NULL, NULL }
     99   };
    100   return ET_main ("real", ps);
    101 }
    102 
    103 
    104 /* end of test_real.c */