fix `regexp-match' variants given a long string and an output port
... again; commit d194fa6245
turned out to be incomplete.
This commit is contained in:
parent
2b7c6e32a9
commit
442f6eaaae
|
@ -1314,15 +1314,16 @@
|
|||
;; unmatched output to a port:
|
||||
(for ([succeed? '(#f #t)])
|
||||
(for ([N '(1 100 1000 1023 1024 10000)])
|
||||
(define o (open-output-bytes))
|
||||
(void (regexp-match-positions #rx"y"
|
||||
(string-append
|
||||
(make-string N #\x)
|
||||
(if succeed? "y" ""))
|
||||
0
|
||||
(+ N (if succeed? 1 0))
|
||||
o))
|
||||
(test N bytes-length (get-output-bytes o))))
|
||||
(for ([M (list 0 (quotient N 2))])
|
||||
(define o (open-output-bytes))
|
||||
(void (regexp-match-positions #rx"y"
|
||||
(string-append
|
||||
(make-string N #\x)
|
||||
(if succeed? "y" ""))
|
||||
M
|
||||
(+ N (if succeed? 1 0))
|
||||
o))
|
||||
(test (- N M) bytes-length (get-output-bytes o)))))
|
||||
|
||||
(arity-test regexp 1 1)
|
||||
(arity-test regexp? 1 1)
|
||||
|
|
|
@ -5386,7 +5386,7 @@ static Scheme_Object *gen_compare(char *name, int pos,
|
|||
|
||||
if (lazy_string) {
|
||||
full_s = lazy_string->s;
|
||||
endset = lazy_string->end;
|
||||
endset = lazy_string->end - lazy_string->start;
|
||||
}
|
||||
|
||||
if (iport) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user