Lines Matching +refs:make +refs:regexp

1 ;;;; regexp.test ---  test Guile's regexps   -*- coding: utf-8; mode: scheme -*-
21 (define-module (test-suite test-regexp)
34 ;;; Run a regexp-substitute or regexp-substitute/global test, once
53 ;;; make-regexp
56 (with-test-prefix "make-regexp"
59 (make-regexp))
62 (make-regexp 'blah))
64 ;; in guile prior to 1.6.5 make-regex didn't validate its flags args
66 (make-regexp "xyz" 'abc))
69 (make-regexp "xyz" regexp/icase 'abc)))
84 ;;; regexp-exec
87 (with-test-prefix "regexp-exec"
90 (let ((re (make-regexp "ab+")))
91 (regexp-exec re "aaaabbbb" 1.5 'bogus-flags-arg)))
94 (let ((re (make-regexp "ab+")))
95 (regexp-exec re 'not-a-string)))
98 (let ((re (make-regexp "ab+")))
99 (regexp-exec re 'not-a-string 5)))
105 (let ((re (make-regexp "ab+")))
106 (regexp-exec re (string #\a #\b (integer->char 0)))))
112 (let ((re (make-regexp "ab+")))
113 (regexp-exec re "aaaabbbb" 0 'bogus-flags-arg))))
135 (logior regexp/notbol regexp/noteol))))
137 (pass-if "regexp/notbol is set correctly"
146 ;;; regexp-quote
158 (with-test-prefix "regexp-quote"
161 (regexp-quote))
164 (regexp-quote 'blah))
166 (let ((lst `((regexp/basic ,regexp/basic)
167 (regexp/extended ,regexp/extended)))
186 (let* ((q (regexp-quote s))
187 (m (regexp-exec (make-regexp q flag) s)))
199 (q (regexp-quote s)))
202 (let* ((m (regexp-exec (make-regexp q flag) s)))
208 (let ((m (regexp-exec (make-regexp (regexp-quote allchars)
216 ;;; regexp-substitute
219 (with-test-prefix "regexp-substitute"
225 (apply vary-port regexp-substitute expected match args)))
242 (with-test-prefix "regexp-substitute/global"
246 (apply vary-port regexp-substitute/global expected args)))
260 ;; This should not go into an infinite loop, just because the regexp
265 ;; These kind of bother me. The extension from regexp-substitute to
266 ;; regexp-substitute/global is only natural if your item list
278 (try "" "_" (make-string 500 #\_)