Skip to content
Snippets Groups Projects
Select Git revision
  • branch/OpenVMS
  • branch/default default protected
  • wild/1a5dd97bc5c0cdedc5a1e02ebc0ea5dbad28a72c
  • wild/ef383bb403b22bb062eca037fe9eb40395e5239d
  • wild/1b27403b1257ec30ce192e8d0af922c1f428c286
  • wild/37aeffd2f03981fb3090960ba53bb5f5c962970d
  • wild/2e949a79e46e9e813e8970a3ed05ded647a5c08e
  • wild/3fe73b8a3bb36ac30a3c4eb3d3d69d6ae453614c
  • wild/9aeb5555cd4f046940492b4572fbc39864a84ae2
  • wild/897288304f9a2037a9463f6001c4688afe711d08
  • wild/2b12dd122d8382282e90998ebadddcf09e847eaf
  • wild/3888945e4fe6438fa8127b7eaf1b10dd9499b15d
  • wild/53e7fce21ef05bf6fa534f067b88e139782e3d5e
  • wild/6096c67ce603c7404e05c9c91b3114f9c0781521
  • wild/69007011f857740b53ce4072c9b8ec202f6e83f3
  • wild/79ef52d5327d1637ddba0472ff28e137245e5c5f
  • wild/ff7aa1400d0d1c4cfc70f3384b2b9dba73668d14
  • wild/8e133c9799f0891d00226eb2f94cd7867d9baf67
  • wild/51e439c2a307243d9801ed7c639396a36ddef007
  • wild/5214eca35b040c5c2b3b3b25277226635e5b1837
  • 2.11.0
21 results

runxmlconf.c

Blame
  • runxmlconf.c 15.89 KiB
    /*
     * runxmlconf.c: C program to run XML W3C conformance testsuites
     *
     * See Copyright for the status of this software.
     *
     * daniel@veillard.com
     */
    
    #include "libxml.h"
    #include <stdio.h>
    
    #ifdef LIBXML_XPATH_ENABLED
    
    #if !defined(_WIN32)
    #include <unistd.h>
    #endif
    #include <string.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    
    #include <libxml/parser.h>
    #include <libxml/parserInternals.h>
    #include <libxml/tree.h>
    #include <libxml/uri.h>
    #include <libxml/xmlreader.h>
    
    #include <libxml/xpath.h>
    #include <libxml/xpathInternals.h>
    
    #define LOGFILE "runxmlconf.log"
    static FILE *logfile = NULL;
    static int verbose = 0;
    
    #define NB_EXPECTED_ERRORS 15
    
    
    const char *skipped_tests[] = {
    /* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */
        "rmt-ns10-035",
        NULL
    };
    
    /************************************************************************
     *									*
     *		File name and path utilities				*
     *									*
     ************************************************************************/
    
    static int checkTestFile(const char *filename) {
        struct stat buf;
    
        if (stat(filename, &buf) == -1)
            return(0);
    
    #if defined(_WIN32)
        if (!(buf.st_mode & _S_IFREG))
            return(0);
    #else
        if (!S_ISREG(buf.st_mode))
            return(0);
    #endif
    
        return(1);
    }
    
    static xmlChar *composeDir(const xmlChar *dir, const xmlChar *path) {
        char buf[500];
    
        if (dir == NULL) return(xmlStrdup(path));