/[pcre]/code/trunk/pcre_jit_test.c
ViewVC logotype

Diff of /code/trunk/pcre_jit_test.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1244 by zherczeg, Mon Oct 29 16:25:25 2012 UTC revision 1245 by zherczeg, Sat Feb 9 11:30:51 2013 UTC
# Line 126  int main(void) Line 126  int main(void)
126  #define F_DIFF          0x080000  #define F_DIFF          0x080000
127  #define F_FORCECONV     0x100000  #define F_FORCECONV     0x100000
128  #define F_PROPERTY      0x200000  #define F_PROPERTY      0x200000
129    #define F_STUDY         0x400000
130    
131  struct regression_test_case {  struct regression_test_case {
132          int flags;          int flags;
# Line 572  static struct regression_test_case regre Line 573  static struct regression_test_case regre
573          { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)*l", "bc ddd abccabccl" },          { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)*l", "bc ddd abccabccl" },
574          { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+?dd", "bcabcacdb bdddd" },          { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+?dd", "bcabcacdb bdddd" },
575          { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+l", "ababccddabdbccd abcccl" },          { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+l", "ababccddabdbccd abcccl" },
576            { MUA, 0, "((?:a|aa)(?(1)aaa))x", "aax" },
577    
578          /* Set start of match. */          /* Set start of match. */
579          { MUA, 0, "(?:\\Ka)*aaaab", "aaaaaaaa aaaaaaabb" },          { MUA, 0, "(?:\\Ka)*aaaab", "aaaaaaaa aaaaaaabb" },
# Line 682  static struct regression_test_case regre Line 684  static struct regression_test_case regre
684          { MUA, 0, "(?(DEFINE)(a(*:aa)))a(?1)b|aac", "aac" },          { MUA, 0, "(?(DEFINE)(a(*:aa)))a(?1)b|aac", "aac" },
685          { MUA, 0, "(a(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },          { MUA, 0, "(a(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },
686          { MUA, 0, "(a(*:aa)){0}(?:b(?1)b)+", "babba" },          { MUA, 0, "(a(*:aa)){0}(?:b(?1)b)+", "babba" },
687          { MUA, 0 | F_NOMATCH, "(a(*:aa)){0}(?:b(?1)b)+", "ba" },          { MUA, 0 | F_NOMATCH | F_STUDY, "(a(*:aa)){0}(?:b(?1)b)+", "ba" },
688          { MUA, 0, "(a\\K(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },          { MUA, 0, "(a\\K(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },
689          { MUA, 0, "(a\\K(*:aa)){0}(?:b(?1)b)+", "babba" },          { MUA, 0, "(a\\K(*:aa)){0}(?:b(?1)b)+", "babba" },
690          { MUA, 0 | F_NOMATCH, "(a\\K(*:aa)){0}(?:b(?1)b)+", "ba" },          { MUA, 0 | F_NOMATCH | F_STUDY, "(a\\K(*:aa)){0}(?:b(?1)b)+", "ba" },
691            { MUA, 0 | F_NOMATCH | F_STUDY, "(*:mark)m", "a" },
692    
693          /* (*COMMIT) verb. */          /* (*COMMIT) verb. */
694          { MUA, 0 | F_NOMATCH, "a(*COMMIT)b", "ac" },          { MUA, 0 | F_NOMATCH, "a(*COMMIT)b", "ac" },
# Line 1230  static int regression_tests(void) Line 1233  static int regression_tests(void)
1233                                          current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_1, 32, getstack8());                                          current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_1, 32, getstack8());
1234                          memset(&dummy_extra8, 0, sizeof(pcre_extra));                          memset(&dummy_extra8, 0, sizeof(pcre_extra));
1235                          dummy_extra8.flags = PCRE_EXTRA_MARK;                          dummy_extra8.flags = PCRE_EXTRA_MARK;
1236                            if (current->start_offset & F_STUDY) {
1237                                    dummy_extra8.flags |= PCRE_EXTRA_STUDY_DATA;
1238                                    dummy_extra8.study_data = extra8->study_data;
1239                            }
1240                          dummy_extra8.mark = &mark8_2;                          dummy_extra8.mark = &mark8_2;
1241                          return_value8[1] = pcre_exec(re8, &dummy_extra8, current->input, strlen(current->input), current->start_offset & OFFSET_MASK,                          return_value8[1] = pcre_exec(re8, &dummy_extra8, current->input, strlen(current->input), current->start_offset & OFFSET_MASK,
1242                                  current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_2, 32);                                  current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_2, 32);
# Line 1260  static int regression_tests(void) Line 1267  static int regression_tests(void)
1267                                          current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_1, 32, getstack16());                                          current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_1, 32, getstack16());
1268                          memset(&dummy_extra16, 0, sizeof(pcre16_extra));                          memset(&dummy_extra16, 0, sizeof(pcre16_extra));
1269                          dummy_extra16.flags = PCRE_EXTRA_MARK;                          dummy_extra16.flags = PCRE_EXTRA_MARK;
1270                            if (current->start_offset & F_STUDY) {
1271                                    dummy_extra16.flags |= PCRE_EXTRA_STUDY_DATA;
1272                                    dummy_extra16.study_data = extra16->study_data;
1273                            }
1274                          dummy_extra16.mark = &mark16_2;                          dummy_extra16.mark = &mark16_2;
1275                          return_value16[1] = pcre16_exec(re16, &dummy_extra16, regtest_buf16, length16, current->start_offset & OFFSET_MASK,                          return_value16[1] = pcre16_exec(re16, &dummy_extra16, regtest_buf16, length16, current->start_offset & OFFSET_MASK,
1276                                  current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_2, 32);                                  current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_2, 32);
# Line 1290  static int regression_tests(void) Line 1301  static int regression_tests(void)
1301                                          current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector32_1, 32, getstack32());                                          current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector32_1, 32, getstack32());
1302                          memset(&dummy_extra32, 0, sizeof(pcre32_extra));                          memset(&dummy_extra32, 0, sizeof(pcre32_extra));
1303                          dummy_extra32.flags = PCRE_EXTRA_MARK;                          dummy_extra32.flags = PCRE_EXTRA_MARK;
1304                            if (current->start_offset & F_STUDY) {
1305                                    dummy_extra32.flags |= PCRE_EXTRA_STUDY_DATA;
1306                                    dummy_extra32.study_data = extra32->study_data;
1307                            }
1308                          dummy_extra32.mark = &mark32_2;                          dummy_extra32.mark = &mark32_2;
1309                          return_value32[1] = pcre32_exec(re32, &dummy_extra32, regtest_buf32, length32, current->start_offset & OFFSET_MASK,                          return_value32[1] = pcre32_exec(re32, &dummy_extra32, regtest_buf32, length32, current->start_offset & OFFSET_MASK,
1310                                  current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector32_2, 32);                                  current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector32_2, 32);

Legend:
Removed from v.1244  
changed lines
  Added in v.1245

  ViewVC Help
Powered by ViewVC 1.1.5