2024-03-05 00:06:03 +01:00
|
|
|
(local fennel (require :fennel))
|
|
|
|
|
|
|
|
(fn events [groups]
|
|
|
|
(let [data (with-open [e (io.open "events-fixture" "r")] (e:read "*a"))
|
|
|
|
parse (fennel.parser data)]
|
|
|
|
;(print data)
|
|
|
|
(coroutine.wrap
|
|
|
|
(fn []
|
|
|
|
(each [ok ast parse]
|
|
|
|
(if ok (coroutine.yield ast)))))))
|
|
|
|
|
|
|
|
(tset package.loaded :anoia.nl { :events events })
|
|
|
|
|
2024-03-05 18:56:59 +01:00
|
|
|
(set _G.arg (doto ["-v" "dummy0" "up"] (tset 0 "test")))
|
2024-03-05 00:06:03 +01:00
|
|
|
|
2024-03-05 18:56:59 +01:00
|
|
|
(local ifwait (require :ifwait))
|
|
|
|
|
|
|
|
(ifwait.run)
|