devout test: replace minisock with lualinux

This commit is contained in:
Daniel Barlow 2024-04-24 18:29:24 +01:00
parent 7e13e017eb
commit ce7e395295

View file

@ -1,6 +1,6 @@
(local { : database : event-loop } (require :devout)) (local { : database : event-loop } (require :devout))
(local { : view } (require :fennel)) (local { : view } (require :fennel))
(local sock (require :minisock)) (local ll (require :lualinux))
(import-macros { : expect : expect= } :anoia.assert) (import-macros { : expect : expect= } :anoia.assert)
(var failed false) (var failed false)
@ -166,9 +166,7 @@ MINOR=17")
)) ))
(fn new-fd [] (fn new-fd []
(let [fd (sock.bind (.. "\1\0" "/tmp/test-socket" "\0\0\0\0\0"))] (ll.open "/dev/zero" 0 0x1ff))
(os.remove "/tmp/test-socket")
fd))
(example (example
"when the callback returns false it is unregistered and the fd is closed" "when the callback returns false it is unregistered and the fd is closed"