fix `regexp-replace*' with procedure and #f matches

This commit is contained in:
Matthew Flatt 2011-01-13 11:01:46 -07:00
parent 79cd92859c
commit 2097e944b7
2 changed files with 3 additions and 1 deletions

View File

@ -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))

View File

@ -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 ""))