Fix include

This commit is contained in:
c9s 2015-11-17 21:35:18 +08:00
parent c128cdef13
commit b0971e1553
2 changed files with 3 additions and 1 deletions

View file

@ -12,6 +12,7 @@
#include "r3_slug.h"
#include "zmalloc.h"
#include "slug.h"
#include "r3_debug.h"
START_TEST (test_pattern_to_opcode)
{
@ -99,7 +100,7 @@ START_TEST (test_r3_inside_slug)
{
char * pattern = "/user/{name:\\s+}/to/{id}";
char * offset = strchr(pattern, '{') + 2;
ck_assert( (int)r3_inside_slug(pattern, strlen(pattern), offset, NULL) );
ck_assert( r3_inside_slug(pattern, strlen(pattern), offset, NULL) != NULL );
ck_assert( *(r3_inside_slug(pattern, strlen(pattern), offset, NULL)) == '{' );
ck_assert( ! r3_inside_slug(pattern, strlen(pattern), pattern, NULL) );
}

View file

@ -7,6 +7,7 @@
#include "r3_slug.h"
#include "zmalloc.h"
#include "bench.h"
#include "r3_debug.h"
#define SAFE_FREE(ptr) if(ptr) free(ptr);