mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Update test suite to better distinguish functional errors with
localname/peername.
This commit is contained in:
parent
3067f4be3a
commit
72c5db8910
@ -152,8 +152,10 @@
|
||||
(:close s))
|
||||
|
||||
(defn check-matching-names [stream]
|
||||
(def [my-ip my-port] (net/localname stream))
|
||||
(def [remote-ip remote-port] (net/peername stream))
|
||||
(def ln (net/localname stream))
|
||||
(def pn (net/peername stream))
|
||||
(def [my-ip my-port] ln)
|
||||
(def [remote-ip remote-port] pn)
|
||||
(def msg (string my-ip " " my-port " " remote-ip " " remote-port))
|
||||
(def buf @"")
|
||||
(ev/gather
|
||||
@ -178,8 +180,7 @@
|
||||
(defn test-names []
|
||||
(with [conn (net/connect "127.0.0.1" "8000")]
|
||||
(check-matching-names conn)))
|
||||
(test-names)
|
||||
(test-names))
|
||||
(repeat 20 (test-names)))
|
||||
(gccollect))
|
||||
|
||||
# Create pipe
|
||||
|
Loading…
Reference in New Issue
Block a user