]> gitweb.factorcode.org Git - factor.git/commitdiff
dont allow tests of help scaffolding unless the vocabulary exists
authorDoug Coleman <erg@jobim.local>
Sat, 18 Apr 2009 04:24:41 +0000 (23:24 -0500)
committerDoug Coleman <erg@jobim.local>
Sat, 18 Apr 2009 04:24:41 +0000 (23:24 -0500)
basis/tools/scaffold/scaffold.factor

index 73e896d5ffbc2c63eea12ddd23f9770bb19f6952..d02faae3a8701cb75db2008aef079e80ff354941 100755 (executable)
@@ -24,6 +24,9 @@ ERROR: no-vocab vocab ;
 
 : contains-separator? ( string -- ? ) [ path-separator? ] any? ;
 
+: ensure-vocab-exists ( string -- string )
+    dup vocabs member? [ no-vocab ] unless ;
+
 : check-vocab-name ( string -- string )
     [ ]
     [ contains-dot? [ vocab-name-contains-dot ] when ]
@@ -234,6 +237,7 @@ PRIVATE>
     [ (help.) ] [ nl vocabulary>> link-vocab ] bi ;
 
 : scaffold-help ( vocab -- )
+    ensure-vocab-exists
     [
         dup "-docs.factor" vocab/suffix>path scaffolding? [
             set-scaffold-docs-file
@@ -268,6 +272,7 @@ PRIVATE>
 PRIVATE>
 
 : scaffold-tests ( vocab -- )
+    ensure-vocab-exists
     dup "-tests.factor" vocab/suffix>path
     scaffolding? [
         set-scaffold-tests-file