]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.test/help.lint: use vocabs-to-load.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Nov 2020 17:15:38 +0000 (09:15 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Nov 2020 17:15:38 +0000 (09:15 -0800)
basis/help/lint/lint.factor
basis/tools/test/test.factor

index 544e73ef50ce5793290e018588ffefd2429412a6..749a76aeec53ed6f2f3f326fe066a374a28a3013 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2006, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs classes combinators command-line continuations fry
-help help.lint.checks help.topics io kernel listener locals
-namespaces parser sequences source-files.errors system
-tools.errors vocabs vocabs.hierarchy vocabs.loader words ;
+USING: assocs classes combinators command-line continuations
+help help.lint.checks help.topics io kernel listener namespaces
+parser sequences source-files.errors system tools.errors vocabs
+vocabs.hierarchy vocabs.hierarchy.private vocabs.loader words ;
 IN: help.lint
 
 SYMBOL: lint-failures
@@ -104,12 +104,7 @@ PRIVATE>
 : test-lint-main ( -- )
     command-line get dup first "--only" = [
         V{ } clone swap rest [
-            dup "resource:" head? [
-                disk-vocabs-in-root
-                [ vocab-prefix? ] reject
-                [ vocab-name "test" swap subseq? ] reject
-                append!
-            ] [ suffix! ] if
+            dup "resource:" head? [ "" vocabs-to-load append! ] [ suffix! ] if
         ] each [ require-all ] [ help-lint-vocabs ] bi
     ] [
         [ [ load ] [ help-lint ] bi ] each
index 468eb01cd8084fb5308df619995fe6b28a2b3e35..cc813f596b4a7ccc1ed25a1506d77e9fc9af1750 100644 (file)
@@ -1,15 +1,14 @@
 ! Copyright (C) 2003, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs combinators command-line
-compiler.units continuations debugger effects fry
-generalizations io io.files.temp io.files.unique kernel lexer
-locals macros math math.functions math.vectors namespaces parser
-prettyprint quotations sequences sequences.generalizations
-source-files source-files.errors source-files.errors.debugger
-splitting stack-checker summary system tools.errors tools.time
-unicode vocabs vocabs.files vocabs.hierarchy vocabs.loader
+compiler.units continuations debugger effects generalizations io
+io.files.temp io.files.unique kernel lexer math math.functions
+math.vectors namespaces parser prettyprint quotations sequences
+sequences.generalizations source-files source-files.errors
+source-files.errors.debugger splitting stack-checker summary
+system tools.errors tools.time unicode vocabs vocabs.files
+vocabs.hierarchy vocabs.hierarchy.private vocabs.loader
 vocabs.metadata vocabs.parser words ;
-FROM: vocabs.hierarchy => load ;
 IN: tools.test
 
 TUPLE: test-failure < source-file-error continuation ;
@@ -231,12 +230,7 @@ M: test-failure error. ( error -- )
 : test-main ( -- )
     command-line get dup first "--only" = [
         V{ } clone swap rest [
-            dup "resource:" head? [
-                disk-vocabs-in-root
-                [ vocab-prefix? ] reject
-                [ vocab-name "test" swap subseq? ] reject
-                append!
-            ] [ suffix! ] if
+            dup "resource:" head? [ "" vocabs-to-load append! ] [ suffix! ] if
         ] each [ require-all ] [ test-vocabs ] bi
     ] [
         [ [ load ] [ test ] bi ] each