From 1b620dee5be4338655be36a08a5cce0234be50d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 6 Jan 2014 08:33:50 +0100 Subject: [PATCH] Docs: examples for vocab-files and vocab-tests --- basis/vocabs/files/files-docs.factor | 32 +++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/basis/vocabs/files/files-docs.factor b/basis/vocabs/files/files-docs.factor index 2f0ea76bdc..0cf6880bec 100644 --- a/basis/vocabs/files/files-docs.factor +++ b/basis/vocabs/files/files-docs.factor @@ -15,9 +15,35 @@ HELP: vocab-tests-dir HELP: vocab-files { $values { "vocab" "a vocabulary specifier" } { "seq" "a sequence of pathname strings" } } -{ $description "Outputs a sequence of files comprising this vocabulary, or " { $link f } " if the vocabulary does not have a directory on disk." } ; +{ $description "Outputs a sequence of files comprising this vocabulary, or " { $link f } " if the vocabulary does not have a directory on disk." } +{ $examples + { $example + "USING: vocabs.files ; " + "\"alien.libraries\" vocab-files ." + "{" + " \"resource:basis/alien/libraries/libraries.factor\"" + " \"resource:basis/alien/libraries/libraries-docs.factor\"" + " \"resource:basis/alien/libraries/libraries-tests.factor\"" + "}" + } +} ; HELP: vocab-tests { $values { "vocab" "a vocabulary specifier" } { "tests" "a sequence of pathname strings" } } -{ $description "Outputs a sequence of pathnames where the unit tests for " { $snippet "vocab" } " are located." } ; - +{ $description "Outputs a sequence of pathnames where the unit tests for " { $snippet "vocab" } " are located." } +{ $examples + { $example + "USING: vocabs.files ; " + "\"xml\" vocab-tests ." + "{" + " \"resource:basis/xml/tests/xmode-dtd.factor\"" + " \"resource:basis/xml/tests/test.factor\"" + " \"resource:basis/xml/tests/state-parser-tests.factor\"" + " \"resource:basis/xml/tests/soap.factor\"" + " \"resource:basis/xml/tests/templating.factor\"" + " \"resource:basis/xml/tests/encodings.factor\"" + " \"resource:basis/xml/tests/xmltest.factor\"" + " \"resource:basis/xml/tests/funny-dtd.factor\"" + "}" + } +} ;