]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/listener/listener-tests.factor
listener: only call parser-quiet? off when listener starts
[factor.git] / basis / listener / listener-tests.factor
index 22b423b74bc2edd1a766a8ac78adaf7ff171fade..9a9bb5c6f6ee89d356f56c74ed556b3f0e332860 100644 (file)
@@ -1,6 +1,6 @@
-USING: io io.streams.string io.streams.duplex listener
-tools.test parser math namespaces continuations vocabs kernel
-compiler.units eval vocabs.parser words definitions ;
+USING: compiler.units continuations definitions eval io
+io.streams.string kernel listener listener.private math namespaces
+parser parser.notes tools.test vocabs vocabs.parser words ;
 IN: listener.tests
 
 SYNTAX: hello "Hi" print ;
@@ -56,7 +56,7 @@ SYNTAX: hello "Hi" print ;
 [ "call" "scratchpad" create-word drop ] with-compilation-unit
 
 [
-    [ t ]
+    { t }
     [
         "call" "scratchpad" lookup-word
         [ "call" search ] with-interactive-vocabs
@@ -65,3 +65,14 @@ SYNTAX: hello "Hi" print ;
 ] with-file-vocabs
 
 [ "call" "scratchpad" lookup-word forget ] with-compilation-unit
+
+[
+    { t } [
+        "[ ]" [
+            t parser-quiet? [
+                { } listener-step drop
+                parser-quiet? get
+            ] with-variable
+        ] with-string-reader
+    ] unit-test
+] with-file-vocabs