]> gitweb.factorcode.org Git - factor.git/blob - core/vocabs/vocabs-tests.factor
Support Link Time Optimization (off by default)
[factor.git] / core / vocabs / vocabs-tests.factor
1 USING: tools.test vocabs ;
2
3 { f } [ "kernel" vocab-main ] unit-test
4
5 { t } [ "" "" child-vocab? ] unit-test
6 { t } [ "" "io.files" child-vocab? ] unit-test
7 { t } [ "io" "io.files" child-vocab? ] unit-test
8 { f } [ "io.files" "io" child-vocab? ] unit-test
9
10 [ "foo/bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
11 [ "foo\\bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
12 [ "foo:bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
13 [ 3 create-vocab ] [ bad-vocab-name? ] must-fail-with
14 [ f create-vocab ] [ bad-vocab-name? ] must-fail-with
15 [ "a b" create-vocab ] [ bad-vocab-name? ] must-fail-with
16
17 [ "foo/bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
18 [ "foo\\bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
19 [ "foo:bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
20 [ 3 lookup-vocab ] [ bad-vocab-name? ] must-fail-with
21 [ f lookup-vocab ] [ bad-vocab-name? ] must-fail-with
22 [ "a b" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
23
24 [ "foo/bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
25 [ "foo\\bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
26 [ "foo:bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
27 [ 3 >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
28 [ f >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
29 [ "a b" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
30
31 [ "sojoijsaoifjsthisdoesntexistomgomgomgplznodontexist" require ]
32 [ no-vocab? ] must-fail-with
33
34 [ "letstrythisagainnooooooyoucantexistnoooooo" load-vocab ]
35 [ no-vocab? ] must-fail-with