2016-03-30 21:43:14 -04:00
|
|
|
USING: tools.test vocabs ;
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2015-07-02 20:28:17 -04:00
|
|
|
{ f } [ "kernel" vocab-main ] unit-test
|
2011-09-25 21:32:03 -04:00
|
|
|
|
2015-07-02 20:28:17 -04:00
|
|
|
{ t } [ "" "" child-vocab? ] unit-test
|
|
|
|
{ t } [ "" "io.files" child-vocab? ] unit-test
|
|
|
|
{ t } [ "io" "io.files" child-vocab? ] unit-test
|
|
|
|
{ f } [ "io.files" "io" child-vocab? ] unit-test
|
2011-10-29 02:39:40 -04:00
|
|
|
|
|
|
|
[ "foo/bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "foo\\bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "foo:bar" create-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ 3 create-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ f create-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "a b" create-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
|
|
|
|
[ "foo/bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "foo\\bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "foo:bar" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ 3 lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ f lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "a b" lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
|
|
|
|
[ "foo/bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "foo\\bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "foo:bar" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ 3 >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ f >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
|
|
|
[ "a b" >vocab-link lookup-vocab ] [ bad-vocab-name? ] must-fail-with
|
2011-11-03 14:34:41 -04:00
|
|
|
|
|
|
|
[ "sojoijsaoifjsthisdoesntexistomgomgomgplznodontexist" require ]
|
|
|
|
[ no-vocab? ] must-fail-with
|
|
|
|
|
|
|
|
[ "letstrythisagainnooooooyoucantexistnoooooo" load-vocab ]
|
|
|
|
[ no-vocab? ] must-fail-with
|