1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators io.directories io.files io.pathnames kernel
4 make sequences splitting vocabs vocabs.loader ;
7 : vocab-tests-path ( vocab -- path/f )
8 dup "-tests.factor" append-vocab-dir vocab-append-path ;
10 : vocab-tests-dir ( vocab -- paths )
11 dup vocab-dir "tests" append-path vocab-append-path [
13 dup directory-files [ ".factor" tail? ] filter
14 [ append-path ] with map
18 : vocab-tests ( vocab -- paths )
19 vocab-name ".private" ?tail drop
21 [ vocab-tests-path [ dup file-exists? [ , ] [ drop ] if ] when* ]
22 [ vocab-tests-dir % ] bi
25 : vocab-files ( vocab -- paths )
28 [ vocab-source-path [ , ] when* ]
29 [ vocab-docs-path [ , ] when* ]