better handling for reporting on callbacks from c library

This commit is contained in:
2026-08-11 11:08:17 +02:00
parent baf0ef5868
commit 8027ad2c9c
4 changed files with 164 additions and 48 deletions
+3 -3
View File
@@ -42,9 +42,9 @@
(define push-text (get-output-string push-out))
(check-true (regexp-match? #rx"\\[git\\] push origin/master" push-text))
(check-true (regexp-match? #rx"\\[git\\] push origin/master: done" push-text))
;; Push progress callbacks remain installed, but must not perform output
;; from FFI callback context. Percentage output would indicate a regression.
(check-false (regexp-match? #rx"%" push-text))
;; A real push reports transfer progress, but the FFI callback itself only
;; records state. A normal Racket thread performs the output.
(check-true (regexp-match? #rx"100%" push-text))
(define quiet-out (open-output-string))
(parameterize ([current-output-port quiet-out])
(git 'push #:quiet #t))