mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Change suite 9 test a bit.
This commit is contained in:
parent
a7ed3dea4b
commit
1759151875
@ -51,16 +51,18 @@
|
|||||||
# Create pipe
|
# Create pipe
|
||||||
|
|
||||||
(var pipe-counter 0)
|
(var pipe-counter 0)
|
||||||
(def [reader writer] (os/pipe))
|
(def chan (ev/chan 10))
|
||||||
(ev/spawn
|
(let [[reader writer] (os/pipe)]
|
||||||
(while (ev/read reader 3)
|
(ev/spawn
|
||||||
(++ pipe-counter))
|
(while (ev/read reader 3)
|
||||||
(assert (= 20 pipe-counter) "ev/pipe 1"))
|
(++ pipe-counter))
|
||||||
|
(assert (= 20 pipe-counter) "ev/pipe 1")
|
||||||
|
(ev/give chan 1))
|
||||||
|
|
||||||
(for i 0 10
|
(for i 0 10
|
||||||
(ev/write writer "xxx---"))
|
(ev/write writer "xxx---"))
|
||||||
|
|
||||||
(ev/close writer)
|
(ev/close writer)
|
||||||
(ev/sleep 0.1)
|
(ev/take chan))
|
||||||
|
|
||||||
(end-suite)
|
(end-suite)
|
||||||
|
Loading…
Reference in New Issue
Block a user