sourcemod/extensions/curl/curl-src/tests/libtest/test.h

52 lines
1.6 KiB
C++
Raw Normal View History

2013-03-18 01:55:59 +01:00
/*****************************************************************************
2009-01-09 00:31:00 +01:00
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
2013-03-18 01:55:59 +01:00
* $Id: test.h,v 1.21 2008-09-18 16:21:09 yangtse Exp $
*/
2009-01-09 00:31:00 +01:00
2013-03-18 01:55:59 +01:00
/* Now include the setup.h file from libcurl's private libdir (the source
version, but that might include "config.h" from the build dir so we need
both of them in the include path), so that we get good in-depth knowledge
about the system we're building this on */
2009-01-09 00:31:00 +01:00
2013-03-18 01:55:59 +01:00
#include "setup.h"
2009-01-09 00:31:00 +01:00
#include <curl/curl.h>
2013-03-18 01:55:59 +01:00
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
2009-01-09 00:31:00 +01:00
2013-03-18 01:55:59 +01:00
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
2009-01-09 00:31:00 +01:00
#ifdef HAVE_SYS_SELECT_H
/* since so many tests use select(), we can just as well include it here */
#include <sys/select.h>
#endif
2013-03-18 01:55:59 +01:00
#ifdef HAVE_UNISTD_H
/* at least somewhat oldish FreeBSD systems need this for select() */
#include <unistd.h>
2009-01-09 00:31:00 +01:00
#endif
2013-03-18 01:55:59 +01:00
#define TEST_ERR_MAJOR_BAD 100
#define TEST_ERR_RUNS_FOREVER 99
2009-01-09 00:31:00 +01:00
extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
/* argc and argv as passed in to the main() function */
extern int test_argc;
extern char **test_argv;
2013-03-18 01:55:59 +01:00
extern int select_test(int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
struct timeval *tv);
2009-01-09 00:31:00 +01:00
extern int test(char *URL); /* the actual test function provided by each
individual libXXX.c file */