fix tests for rename
This commit is contained in:
parent
d39d7059b9
commit
cc0f881fed
@ -122,8 +122,9 @@
|
|||||||
(if (not result.active)
|
(if (not result.active)
|
||||||
(completions-widget:hide))
|
(completions-widget:hide))
|
||||||
(set entry.text (or result.default result.error ""))
|
(set entry.text (or result.default result.error ""))
|
||||||
|
(when widget.parent
|
||||||
(widget.parent:set_visible_child_name
|
(widget.parent:set_visible_child_name
|
||||||
(if result.active "commander" "echo-area")))
|
(if result.active "commander" "echo-area"))))
|
||||||
|
|
||||||
(fn on-input [self str]
|
(fn on-input [self str]
|
||||||
(match self.state
|
(match self.state
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
(let [commander (Command.commander)
|
(let [commander (Command.commander)
|
||||||
(ok err)
|
(ok err)
|
||||||
(match-try (commander:activate)
|
(match-try (commander:activate)
|
||||||
{:active true} (commander:on-activate "not-a-command")
|
{:active true} (commander:on-input-finished "not-a-command")
|
||||||
(where {:error e :active false} (e:match "can't find command")) true
|
(where {:error e :active false} (e:match "can't find command")) true
|
||||||
(catch
|
(catch
|
||||||
x (values nil (view x))))]
|
x (values nil (view x))))]
|
||||||
@ -30,9 +30,9 @@
|
|||||||
(let [commander (Command.commander)
|
(let [commander (Command.commander)
|
||||||
(ok err)
|
(ok err)
|
||||||
(match-try (commander:activate)
|
(match-try (commander:activate)
|
||||||
{:active true} (commander:on-activate "multiply")
|
{:active true} (commander:on-input-finished "multiply")
|
||||||
{:active true :prompt p1} (commander:on-activate "2")
|
{:active true :prompt p1} (commander:on-input-finished "2")
|
||||||
{:active true :prompt p2} (commander:on-activate "3")
|
{:active true :prompt p2} (commander:on-input-finished "3")
|
||||||
(where {:active false} (= happened 6)) true
|
(where {:active false} (= happened 6)) true
|
||||||
(catch
|
(catch
|
||||||
x (values nil (view x))))]
|
x (values nil (view x))))]
|
||||||
|
Loading…
Reference in New Issue
Block a user