1
0
Fork 0
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:
Jeremy Ashkenas 2009-12-24 00:49:11 -08:00
parent 47928ca952
commit 849f0e4192

View file

@ -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