dunlin/test/keymap.fnl

21 lines
341 B
Fennel

(local { : view } (require :fennel))
(local keymap (require :keymap))
(local km
{"a"
{"a" #1
"b" #2}
"b"
{"z" #3}
"c" #4
})
(let [r (keymap.recogniser km)
(ok err)
(match (r:accept "c")
(where f (= (f) 4)) true
x (values false (x)))]
(assert ok err))