sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
| 1 | #!sqlite3 |
| 2 | # |
| 3 | # 2025-12-16 |
| 4 | # |
| 5 | # The author disclaims copyright to this source code. In place of |
| 6 | # a legal notice, here is a blessing: |
| 7 | # |
| 8 | # May you do good and not evil. |
| 9 | # May you find forgiveness for yourself and forgive others. |
| 10 | # May you share freely, never taking more than you give. |
| 11 | # |
| 12 | #*********************************************************************** |
| 13 | # |
| 14 | # Test cases for the oversized patterns in the REGEXP extension found |
| 15 | # at ext/misc/regexp.c. |
| 16 | # |
| 17 | .open :memory: |
| 18 | .mode list |
| 19 | .testcase 100 |
| 20 | -- 0 1 2 3 4 |
| 21 | -- 123456789 123456789 123456789 123456789 123 |
| 22 | SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))'; |
| 23 | .check 1 |
| 24 | |
| 25 | .testcase 110 |
| 26 | .limit like_pattern_length 42 |
| 27 | SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))'; |
| 28 | .check -glob "*rror near line *: REGEXP pattern too big*" |
| 29 | |
| 30 | .testcase 120 |
| 31 | .limit like_pattern_length 43 |
| 32 | SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))'; |
| 33 | .check 1 |