USING: assocs ui.tools.search help.topics io.files io.styles kernel namespaces sequences source-files threads tools.test ui.gadgets ui.gestures vocabs vocabs.loader words tools.test.ui debugger ; IN: temporary [ f ] [ "no such word with this name exists, certainly" f f T{ key-down f { C+ } "x" } swap search-gesture ] unit-test : assert-non-empty empty? f assert= ; : update-live-search ( search -- seq ) dup [ 300 sleep live-search-list control-value ] with-grafted-gadget ; : test-live-search ( gadget quot -- ? ) >r update-live-search dup assert-non-empty r> all? ; [ t ] [ "swp" all-words f [ word? ] test-live-search ] unit-test [ t ] [ "" all-words t dup [ { "set-word-prop" } over live-search-field set-control-value 300 sleep search-value \ set-word-prop eq? ] with-grafted-gadget ] unit-test [ t ] [ "quot" [ link? ] test-live-search ] unit-test [ t ] [ "factor" source-files get keys [ pathname? ] test-live-search ] unit-test [ t ] [ "kern" [ vocab-spec? ] test-live-search ] unit-test [ t ] [ "a" { "a" "b" "aa" } [ input? ] test-live-search ] unit-test