mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
added comprehensive linting to the test suit
This commit is contained in:
parent
47928ca952
commit
849f0e4192
1 changed files with 12 additions and 0 deletions
|
|
@ -2,6 +2,8 @@ require 'test_helper'
|
|||
|
||||
class ExecutionTest < Test::Unit::TestCase
|
||||
|
||||
NO_WARNINGS = /\A(0 error\(s\), 0 warning\(s\)\n)+\Z/
|
||||
|
||||
def test_execution_of_coffeescript
|
||||
`bin/coffee-script test/fixtures/execution/*.cs`
|
||||
sources = Dir['test/fixtures/execution/*.js'].map {|f| File.expand_path(f) }
|
||||
|
|
@ -15,4 +17,14 @@ class ExecutionTest < Test::Unit::TestCase
|
|||
Dir.chdir(starting_place)
|
||||
end
|
||||
|
||||
def test_lintless_coffeescript
|
||||
lint_results = `bin/coffee-script -l test/fixtures/execution/*.cs`
|
||||
assert lint_results.match(NO_WARNINGS)
|
||||
end
|
||||
|
||||
def test_lintless_examples
|
||||
lint_results = `bin/coffee-script -l examples/*.cs`
|
||||
assert lint_results.match(NO_WARNINGS)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue