Repository navigation
Commit 6d09118
committed
Add a MySQL-judged REGEXP test suite
Check the REGEXP functions against what MySQL 8.4 returns. A case is
a pattern, a subject, and a match type, where a null match type runs
without the argument. Each function has a test class that runs its
checks through the driver: REGEXP_LIKE(), REGEXP_INSTR() for the start
and end of the first match, REGEXP_SUBSTR(), and REGEXP_REPLACE() with
a template that shows every match and capture group.
The cases take the patterns of REGEXP, RLIKE, and REGEXP_*() from the
MySQL server test suite, with their own subjects and a fixed set of
varied subjects.
Each class lists the cases that are expected to fail, where any of its
checks fails, and its test fails when they differ. Cases that fail only
with some PHP or PCRE versions are listed under version checks, with
the cause of each. The tests of REGEXP_INSTR(), REGEXP_SUBSTR(), and
REGEXP_REPLACE() are skipped until these functions exist.
"tests/tools/generate-regexp-test-data.php" rebuilds the data from a
MySQL server.1 parent 15f3130 commit 6d09118
7 files changed
Lines changed: 13749 additions & 0 deletions
File tree
- packages/mysql-on-sqlite/tests
- regexp
- data
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments