1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/test/unit/test_execution.rb

24 lines
615 B
Ruby
Raw Normal View History

2009-12-24 00:12:07 -08:00
require 'test_helper'
class ExecutionTest < Test::Unit::TestCase
NO_WARNINGS = /\A(0 error\(s\), 0 warning\(s\)\n)+\Z/
ALLS_WELL = /\A\n?(true\n)+\Z/
2009-12-24 00:12:07 -08:00
def test_execution_of_coffeescript
sources = ['test/fixtures/execution/*.cs'].join(' ')
assert `bin/coffee-script -r #{sources}`.match(ALLS_WELL)
2009-12-24 00:12:07 -08:00
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
2009-12-24 00:12:07 -08:00
end