AtlatestRepositorysigil-wm

sigil-wm / tree / testrepl-client.sgl

1(import (sigil io) (sigil process) (sigil wm repl))
2(define path (getenv "SIGIL_WM_REPL"))
3(define id (string->number (getenv "SIGIL_WM_CLIENT_ID")))
4(do ((index 0 (+ index 1))) ((= index 12))
5 (let* ((expected (list 'value (list id index)))
6 (reply
7 (repl-request path
8 (string-append "(begin (sleep 0.02) (quote (" (number->string id) " "
9 (number->string index) ")))")))
10 (actual (read (open-input-string reply))))
11 (unless (equal? actual expected)
12 (error "yielding reply was lost or misrouted" id index reply))))
13(display "REPL_CONCURRENCY_CLIENT=PASS\n")