"Fossies" - the Fresh Open Source Software Archive

Member "libextractor-1.11/src/plugins/test_odf.c" (30 Jan 2021, 2692 Bytes) of package /linux/privat/libextractor-1.11.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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_odf.c
   22  * @brief testcase for odf plugin
   23  * @author Christian Grothoff
   24  */
   25 #include "platform.h"
   26 #include "test_lib.h"
   27 
   28 
   29 /**
   30  * Main function for the ODF 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 odf_cg_sol[] = {
   40     {
   41       EXTRACTOR_METATYPE_MIMETYPE,
   42       EXTRACTOR_METAFORMAT_UTF8,
   43       "text/plain",
   44       "application/vnd.oasis.opendocument.text",
   45       strlen ("application/vnd.oasis.opendocument.text") + 1,
   46       0
   47     },
   48     {
   49       EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE,
   50       EXTRACTOR_METAFORMAT_UTF8,
   51       "text/plain",
   52       "OpenOffice.org/3.2$Unix OpenOffice.org_project/320m12$Build-9483",
   53       strlen (
   54         "OpenOffice.org/3.2$Unix OpenOffice.org_project/320m12$Build-9483") + 1,
   55       0
   56     },
   57     {
   58       EXTRACTOR_METATYPE_PAGE_COUNT,
   59       EXTRACTOR_METAFORMAT_UTF8,
   60       "text/plain",
   61       "1",
   62       strlen ("1") + 1,
   63       0
   64     },
   65     {
   66       EXTRACTOR_METATYPE_CREATION_DATE,
   67       EXTRACTOR_METAFORMAT_UTF8,
   68       "text/plain",
   69       "2005-11-22T11:44:00",
   70       strlen ("2005-11-22T11:44:00") + 1,
   71       0
   72     },
   73     {
   74       EXTRACTOR_METATYPE_UNKNOWN_DATE,
   75       EXTRACTOR_METAFORMAT_UTF8,
   76       "text/plain",
   77       "2010-06-09T13:09:34",
   78       strlen ("2010-06-09T13:09:34") + 1,
   79       0
   80     },
   81     {
   82       EXTRACTOR_METATYPE_TITLE,
   83       EXTRACTOR_METAFORMAT_UTF8,
   84       "text/plain",
   85       "Anhang 1: Profile der beteiligten Wissenschaftler",
   86       strlen ("Anhang 1: Profile der beteiligten Wissenschaftler") + 1,
   87       0
   88     },
   89     { 0, 0, NULL, NULL, 0, -1 }
   90   };
   91   struct ProblemSet ps[] = {
   92     { "testdata/odf_cg.odt",
   93       odf_cg_sol },
   94     { NULL, NULL }
   95   };
   96   return ET_main ("odf", ps);
   97 }
   98 
   99 
  100 /* end of test_odf.c */