]> gitweb.factorcode.org Git - factor.git/blob - extra/help/definitions/definitions-tests.factor
Initial import
[factor.git] / extra / help / definitions / definitions-tests.factor
1 USING: math definitions help.topics help tools.test
2 prettyprint parser io.streams.string kernel source-files
3 assocs namespaces words io ;
4 IN: temporary
5
6 [ ] [ \ + >link see ] unit-test
7
8 [
9     file-vocabs
10
11     [ 4 ] [
12         "IN: temporary USING: help.syntax ; : hello ; HELP: hello \"test\" ; ARTICLE: \"hello\" \"world\" ; ARTICLE: \"hello2\" \"world\" ;" <string-reader> "foo"
13         parse-stream drop
14
15         "foo" source-file source-file-definitions assoc-size
16     ] unit-test
17
18     [ t ] [ "hello" articles get key? ] unit-test
19     [ t ] [ "hello2" articles get key? ] unit-test
20     [ t ] [
21         "hello" "temporary" lookup "help" word-prop >boolean
22     ] unit-test
23
24     [ 2 ] [
25         "IN: temporary USING: help.syntax ; : hello ; ARTICLE: \"hello\" \"world\" ;" <string-reader> "foo"
26         parse-stream drop
27
28         "foo" source-file source-file-definitions assoc-size
29     ] unit-test
30
31     [ t ] [ "hello" articles get key? ] unit-test
32     [ f ] [ "hello2" articles get key? ] unit-test
33     [ f ] [
34         "hello" "temporary" lookup "help" word-prop
35     ] unit-test
36
37     [ [ ] ] [ "IN: temporary USING: help.syntax ; : xxx ; HELP: xxx ;" parse ] unit-test
38
39     [ ] [ "xxx" "temporary" lookup help ] unit-test
40
41     [ ] [ "xxx" "temporary" lookup >link synopsis print ] unit-test
42 ] with-scope