fix `regexp-replace*' with procedure and #f matches
This commit is contained in:
parent
79cd92859c
commit
2097e944b7
|
@ -404,7 +404,7 @@
|
|||
(check
|
||||
replacement
|
||||
(for/list ([m ms])
|
||||
(sub buf (car m) (cdr m))))
|
||||
(and m (sub buf (car m) (cdr m)))))
|
||||
(replac ms replacement))
|
||||
(sub buf start mstart)
|
||||
acc))
|
||||
|
|
|
@ -1090,6 +1090,8 @@
|
|||
((equal? what #"trout") (bytes-append color #" fish"))
|
||||
(else (bytes-append color #" " what)))))
|
||||
|
||||
(test "foofoo" regexp-replace* #px"(.)?" "a" (lambda args "foo"))
|
||||
|
||||
;; Test weird port offsets:
|
||||
(define (test-weird-offset regexp-match regexp-match-positions)
|
||||
(test #f regexp-match "e" (open-input-string ""))
|
||||
|
|
Loading…
Reference in New Issue
Block a user