1 ! Unit tests for vocabs vocabulary
2 USING: vocabs tools.test ;
5 [ f ] [ "kernel" vocab-main ] unit-test
7 [ t ] [ "" "" child-vocab? ] unit-test
8 [ t ] [ "" "io.files" child-vocab? ] unit-test
9 [ t ] [ "io" "io.files" child-vocab? ] unit-test
10 [ f ] [ "io.files" "io" child-vocab? ] unit-test
12 [ "foo/bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
13 [ "foo\\bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
14 [ "foo:bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
15 [ 3 create-vocab ] [ bad-vocab-name? ] must-fail-with
16 [ f create-vocab ] [ bad-vocab-name? ] must-fail-with
17 [ "a b" create-vocab ] [ bad-vocab-name? ] must-fail-with
19 [ "foo/bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
20 [ "foo\\bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
21 [ "foo:bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
22 [ 3 lookup-vocab ] [ bad-vocab-name? ] must-fail-with
23 [ f lookup-vocab ] [ bad-vocab-name? ] must-fail-with
24 [ "a b" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
26 [ "foo/bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
27 [ "foo\\bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
28 [ "foo:bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
29 [ 3 >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
30 [ f >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
31 [ "a b" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
33 [ "sojoijsaoifjsthisdoesntexistomgomgomgplznodontexist" require ]
34 [ no-vocab? ] must-fail-with
36 [ "letstrythisagainnooooooyoucantexistnoooooo" load-vocab ]
37 [ no-vocab? ] must-fail-with