help.lint: Add a MAIN: to help-lint to test lint from command line like we already have for unit tests.
Also flush stdout for both MAIN: test apps.elevate-erg
							parent
							
								
									06b07b9e9c
								
							
						
					
					
						commit
						411a55314c
					
				| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
! Copyright (C) 2006, 2009 Slava Pestov.
 | 
					! Copyright (C) 2006, 2009 Slava Pestov.
 | 
				
			||||||
! See http://factorcode.org/license.txt for BSD license.
 | 
					! See http://factorcode.org/license.txt for BSD license.
 | 
				
			||||||
USING: assocs combinators continuations fry help
 | 
					USING: assocs classes combinators command-line continuations fry
 | 
				
			||||||
help.lint.checks help.topics io kernel namespaces parser
 | 
					help help.lint.checks help.topics io kernel listener locals
 | 
				
			||||||
sequences source-files.errors vocabs.hierarchy vocabs words
 | 
					namespaces parser sequences source-files.errors system
 | 
				
			||||||
classes locals tools.errors listener ;
 | 
					tools.errors vocabs vocabs.hierarchy ;
 | 
				
			||||||
IN: help.lint
 | 
					IN: help.lint
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SYMBOL: lint-failures
 | 
					SYMBOL: lint-failures
 | 
				
			||||||
| 
						 | 
					@ -97,3 +97,12 @@ PRIVATE>
 | 
				
			||||||
    [ word-help ] reject
 | 
					    [ word-help ] reject
 | 
				
			||||||
    [ article-parent ] filter
 | 
					    [ article-parent ] filter
 | 
				
			||||||
    [ predicate? ] reject ;
 | 
					    [ predicate? ] reject ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: test-lint-main ( -- )
 | 
				
			||||||
 | 
					    command-line get [ load ] each
 | 
				
			||||||
 | 
					    help-lint-all
 | 
				
			||||||
 | 
					    lint-failures get assoc-empty?
 | 
				
			||||||
 | 
					    [ [ "==== FAILING LINT" print :lint-failures flush ] unless ]
 | 
				
			||||||
 | 
					    [ 0 1 ? exit ] bi ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					MAIN: test-lint-main
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,7 +213,7 @@ M: test-failure error. ( error -- )
 | 
				
			||||||
: test-main ( -- )
 | 
					: test-main ( -- )
 | 
				
			||||||
    command-line get [ [ load ] [ test ] bi ] each
 | 
					    command-line get [ [ load ] [ test ] bi ] each
 | 
				
			||||||
    test-failures get empty?
 | 
					    test-failures get empty?
 | 
				
			||||||
    [ [ "==== FAILING TESTS" print :test-failures ] unless ]
 | 
					    [ [ "==== FAILING TESTS" print flush :test-failures ] unless ]
 | 
				
			||||||
    [ 0 1 ? exit ] bi ;
 | 
					    [ 0 1 ? exit ] bi ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAIN: test-main
 | 
					MAIN: test-main
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue