Debian Codegraph @

test/regexp1.sql

raw
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 .mode list
18 .testcase 100
19 -- 0 1 2 3 4
20 -- 123456789 123456789 123456789 123456789 123
21 SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))';
22 .check 1
23
24 .testcase 110
25 .limit like_pattern_length 42
26 SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))';
27 .check -glob "Error near line *: REGEXP pattern too big*"
28
29 .testcase 120
30 .limit like_pattern_length 43
31 SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))';
32 .check 1