Debian Codegraph @

lib/_irregex/test/test-irregex-pcre.scm

raw symbols SCIP
1 (test-begin "pcre")
2
3 (test-assert (irregex-search "\\x41," "A,"))
4 (test-assert (irregex-search "\\x{0041}" "A,"))
5
6 (test-assert (irregex-search "<[[:alpha:]]+>" "<abc>"))
7 (test-assert (not (irregex-search "<[[:alpha:]]+>" "<ab7c>")))
8 (test-assert (irregex-search "<[[^:alpha:]]+>" "<123>"))
9 (test-assert (not (irregex-search "<[[^:alpha:]]+>" "<12a3>")))
10 (test-error (irregex-search "<[[=alpha=]]+>" "<abc>"))
11 (test-error (irregex-search "<[[.alpha.]]+>" "<abc>"))
12
13 (test-assert (irregex-match "\\Q.*\\+" ".*\\+"))
14 (test-assert (irregex-match "\\Q.*\\+\\E" ".*\\+"))
15 (test-assert (not (irregex-match "\\Q.*\\+\\E" "x*\\+")))
16 (test-assert (irregex-match "\\Q.*\\" ".*\\"))
17
18 ;;;; not added until perl 5.10 - implementation is too ugly and this
19 ;;;; is too silly of a feature to keep
20 ;; (test-assert (irregex-search "(sens|respons)e and (?1)ibility" "sense and responsibility"))
21
22 (test-end)
23
24