ui.tools.listener.tests: fix tests, manifest needs to be set and vocab used

db4
Björn Lindqvist 2015-10-22 23:33:46 +02:00
parent 436cb76dd3
commit 5f6ec2ba8b
1 changed files with 11 additions and 10 deletions

View File

@ -1,7 +1,8 @@
USING: accessors arrays calendar concurrency.promises continuations USING: accessors arrays calendar concurrency.promises continuations
documents io kernel lexer listener math namespaces parser quotations documents io kernel lexer listener math namespaces parser quotations
sequences threads tools.test ui.gadgets.debug ui.gadgets.editors sequences threads tools.test ui.gadgets.debug ui.gadgets.editors
ui.gadgets.panes ui.gestures ui.tools.common ui.tools.listener ; ui.gadgets.panes ui.gestures ui.tools.common ui.tools.listener
vocabs.parser ;
IN: ui.tools.listener.tests IN: ui.tools.listener.tests
[ [
@ -210,16 +211,16 @@ CONSTANT: text "Hello world.\nThis is a test."
{ [ 3 4 + ] } [ { [ 3 4 + ] } [
<listener-gadget> input>> [ register-self ] keep <listener-gadget> input>> [ register-self ] keep
[ { "3 4 +" } swap interactor-continue ] keep [ { "3 4 +" } swap interactor-continue ] keep
stream-read-quot [ "math" use-vocab stream-read-quot ] with-manifest
] unit-test ] unit-test
! try-parse ! try-parse
{ t } [ { [ sq ] t t } [
{ "goga" } try-parse [
[ callable? ] [ length 2 = ] [ first lexer-error? ] tri and and "math" use-vocab
] unit-test
{ [ sq ] t } [
{ "sq" } try-parse { "sq" } try-parse
{ "[" } try-parse first lexer-error? { "[" } try-parse first lexer-error?
{ "goga" } try-parse
[ callable? ] [ length 2 = ] [ first lexer-error? ] tri and and
] with-manifest
] unit-test ] unit-test