vocabs.files: adding a 'vocab-tests-path' that doesn't check for existence.
parent
6994b0eed8
commit
3a5d7077fb
|
@ -1,9 +1,13 @@
|
|||
USING: help.markup help.syntax strings ;
|
||||
IN: vocabs.files
|
||||
|
||||
HELP: vocab-tests-file
|
||||
HELP: vocab-tests-path
|
||||
{ $values { "vocab" "a vocabulary specifier" } { "path" "pathname string to test file" } }
|
||||
{ $description "Outputs a pathname where the unit test file is located." } ;
|
||||
{ $description "Outputs a pathname where the unit test file for " { $snippet "vocab" } " is located. Outputs " { $link f } " if the vocabulary does not have a directory on disk." } ;
|
||||
|
||||
HELP: vocab-tests-file
|
||||
{ $values { "vocab" "a vocabulary specifier" } { "path/f" "pathname string to test file" } }
|
||||
{ $description "Outputs a pathname where the unit test file is located, or " { $link f } " if the file does not exist." } ;
|
||||
|
||||
HELP: vocab-tests-dir
|
||||
{ $values { "vocab" "a vocabulary specifier" } { "paths" "a sequence of pathname strings" } }
|
||||
|
|
|
@ -4,8 +4,11 @@ USING: io.directories io.files io.pathnames kernel make
|
|||
sequences vocabs.loader ;
|
||||
IN: vocabs.files
|
||||
|
||||
: vocab-tests-file ( vocab -- path )
|
||||
dup "-tests.factor" append-vocab-dir vocab-append-path dup
|
||||
: vocab-tests-path ( vocab -- path )
|
||||
dup "-tests.factor" append-vocab-dir vocab-append-path ;
|
||||
|
||||
: vocab-tests-file ( vocab -- path/f )
|
||||
vocab-tests-path dup
|
||||
[ dup exists? [ drop f ] unless ] [ drop f ] if ;
|
||||
|
||||
: vocab-tests-dir ( vocab -- paths )
|
||||
|
|
Loading…
Reference in New Issue