diff --git a/apache2/Makefile b/apache2/Makefile index 801338a1..a48efd7b 100644 --- a/apache2/Makefile +++ b/apache2/Makefile @@ -53,13 +53,13 @@ CFLAGS = -O2 -g -Wuninitialized -Wall -Wmissing-prototypes -Wshadow -Wunused-var all: local-shared-build ### Experimental Test Framework (UNIX only right now) -TESTOBJS = \ - re.o re_operators.o re_actions.o re_tfns.o re_variables.o \ - msc_logging.o msc_xml.o msc_multipart.o modsecurity.o msc_parsers.o msc_util.o msc_pcre.o \ - persist_dbm.o msc_reqbody.o msc_geo.o acmp.o +TESTOBJS = re.o re_operators.o re_actions.o re_tfns.o re_variables.o \ + msc_logging.o msc_xml.o msc_multipart.o modsecurity.o \ + msc_parsers.o msc_util.o msc_pcre.o persist_dbm.o \ + msc_reqbody.o msc_geo.o acmp.o msc_lua.o msc-test: msc-test.c ${TESTOBJS} - @${CC} -I .. -I `${top_dir}/bin/${APXS} -q INCLUDEDIR` ${INCLUDES} ${DEFS} -L ${top_dir}/lib -o msc-test ${TESTOBJS} msc-test.c -lapr-1 -laprutil-1 -lpcre -lxml2 + @${CC} -I `${top_dir}/bin/${APXS} -q INCLUDEDIR` ${INCLUDES} ${DEFS} -L ${top_dir}/lib -o msc-test ${TESTOBJS} msc-test.c -lapr-1 -laprutil-1 -lpcre -lxml2 -llua5.1 test: msc-test t/run-tests.pl diff --git a/apache2/msc-test.c b/apache2/msc-test.c index 97a26ff7..e7f65eed 100644 --- a/apache2/msc-test.c +++ b/apache2/msc-test.c @@ -75,6 +75,9 @@ apr_status_t unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex) { return APR_SUCCESS; } + +/* Escaping functions */ + static unsigned char hex2dec(unsigned char *what) { register unsigned char digit; @@ -125,6 +128,8 @@ static char *escape(unsigned char *str, apr_size_t *len) } +/* Testing functions */ + static int test_tfn(const char *name, unsigned char *input, long input_len, unsigned char **rval, long *rval_len, char **errmsg) { int rc = -1; @@ -150,6 +155,8 @@ static int test_tfn(const char *name, unsigned char *input, long input_len, unsi } +/* Main */ + int main(int argc, const char * const argv[]) { apr_file_t *fd;