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
documents io kernel lexer listener math namespaces parser quotations
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
[
@ -210,16 +211,16 @@ CONSTANT: text "Hello world.\nThis is a test."
{ [ 3 4 + ] } [
<listener-gadget> input>> [ register-self ] keep
[ { "3 4 +" } swap interactor-continue ] keep
stream-read-quot
[ "math" use-vocab stream-read-quot ] with-manifest
] unit-test
! try-parse
{ t } [
{ "goga" } try-parse
[ callable? ] [ length 2 = ] [ first lexer-error? ] tri and and
] unit-test
{ [ sq ] t } [
{ "sq" } try-parse
{ "[" } try-parse first lexer-error?
{ [ sq ] t t } [
[
"math" use-vocab
{ "sq" } try-parse
{ "[" } try-parse first lexer-error?
{ "goga" } try-parse
[ callable? ] [ length 2 = ] [ first lexer-error? ] tri and and
] with-manifest
] unit-test