]> gitweb.factorcode.org Git - factor.git/commitdiff
help.syntax: more tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 15 Dec 2020 04:24:28 +0000 (20:24 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 15 Dec 2020 04:24:28 +0000 (20:24 -0800)
basis/help/syntax/syntax-tests.factor
basis/help/syntax/syntax.factor

index 8f020a8e573cafedd0ea73529a6d96817a968f72..191fe7321ed9fb7e63dc5dac925f6b9b7f6af5fb 100644 (file)
@@ -1,6 +1,5 @@
-USING: kernel tools.test parser vocabs help.syntax namespaces
-eval accessors ;
-IN: help.syntax.tests
+USING: accessors eval help.markup help.syntax kernel parser
+tools.test vocabs ;
 
 [
     [ "foobar" ] [
@@ -18,6 +17,12 @@ IN: help.syntax.tests
 
 { { $description } } [ HELP{ $description } ] unit-test
 
+{ { $description "test" } } [ HELP{ $description "test" } ] unit-test
+
+{ { $description "test " { $snippet "and" } " that" } } [
+    HELP{ $description "test " { $snippet "and" } " that" }
+] unit-test
+
 { { $description "this and that" } } [
     HELP{ $description this and that }
 ] unit-test
index a1855211c3bd83208f6333efaff5ad5882e16f12..42611d1140c22a95b62792ad54629ecae8f58ccf 100644 (file)
@@ -92,7 +92,7 @@ IN: help.syntax
 PRIVATE>
 
 SYNTAX: HELP{
-    scan-word dup \ } eq? [ drop { } ] [
+    scan-object dup \ } eq? [ drop { } ] [
         {
             { [ dup help-text? ] [ parse-help-text ] }
             { [ dup help-values? ] [ parse-help-values ] }