A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/pcre2posix__test_8c_source.html below:

NCBI C++ ToolKit: src/util/regexp/pcre2posix_test.c Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

30 #define PRINTF if (v) printf 54 #define count (int)(sizeof(cflags)/sizeof(int)) 60 static const char

*

data0_1

[] = {

"posix"

,

"lower posix"

,

"upper POSIX"

,

NULL

};

61 static const char

*

data2_3

[] = {

"(*LF)^(cat|dog)"

,

"catastrophic\ncataclysm"

,

62  "dogfight"

,

"no animals"

,

NULL

};

63 static const char

*

data4

[] = {

"*badpattern"

,

NULL

};

121 int main

(

int

argc,

char

**argv)

125 int

v = argc > 1 &&

strcmp

(argv[1],

"-v"

) == 0;

127 PRINTF

(

"Test of pcre2posix.h without pcre2.h\n"

);

131  char

*pattern =

data

[

i

][0];

132  char

**subjects =

data

[

i

] + 1;

136  PRINTF

(

"Pattern: %s flags=0x%02x\n"

, pattern,

cflags

[

i

]);

140

fprintf(stderr,

"Unexpected compile error %d (expected %d)\n"

, rc, *rd);

141

fprintf(stderr,

"Pattern is: %s\n"

, pattern);

151  PRINTF

(

"Compile error %d: %s (expected)\n"

, rc,

buffer

);

156  for

(; *subjects !=

NULL

; subjects++)

160  PRINTF

(

"Subject: %s\n"

, *subjects);

161  PRINTF

(

"Return: %d"

, rc);

166

fprintf(stderr,

"Unexpected match error %d (expected %d)\n"

, rc, *rd);

167

fprintf(stderr,

"Pattern is: %s\n"

, pattern);

168

fprintf(stderr,

"Subject is: %s\n"

, *subjects);

174  for

(

int

j = 0; j <

CAPCOUNT

; j++)

177  if

(m->

rm_so

< 0)

continue

;

178  if

(m->

rm_so

!= *(++rd) || m->

rm_eo

!= *(++rd))

181

fprintf(stderr,

"Mismatched results for successful match\n"

);

182

fprintf(stderr,

"Pattern is: %s\n"

, pattern);

183

fprintf(stderr,

"Subject is: %s\n"

, *subjects);

184

fprintf(stderr,

"Result %d: expected %d %d received %d %d\n"

,

205 PRINTF

(

"End of test\n"

);

int strcmp(const char *str1, const char *str2)

static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)

static const char * data2_3[]

static const char * data0_1[]

int main(int argc, char **argv)

static const char * data4[]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4