File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- desc 'Run all tests'
1+ require "rake/testtask"
22
3- task :default => :test
4- task :test do
5- $LOAD_PATH. unshift ( File . expand_path ( 'lib' ) )
6- $LOAD_PATH. unshift ( File . expand_path ( 'test' ) )
7- require 'redgreen' if Gem . available? ( 'redgreen' ) and RUBY_VERSION < "1.9"
8- require 'test/unit'
9- Dir [ 'test/**/test_*.rb' ] . each { |test | require test }
3+ Rake ::TestTask . new do |t |
4+ t . libs += [ "lib" , "test" ]
5+ t . test_files = FileList [ "test/**/*_test.rb" ]
6+ t . verbose = true
107end
118
129namespace :gem do
@@ -22,4 +19,6 @@ namespace :gem do
2219 sh "sudo gem uninstall -x closure-compiler"
2320 end
2421
25- end
22+ end
23+
24+ task :default => :test
Original file line number Diff line number Diff line change 1+ if defined? ( Gem ) and Gem . available? ( 'redgreen' )
2+ require 'redgreen' if RUBY_VERSION < "1.9"
3+ end
4+ require 'test/unit'
5+
16require 'closure-compiler'
27
38class Test ::Unit ::TestCase
Original file line number Diff line number Diff line change @@ -33,12 +33,16 @@ def test_block_syntax
3333 assert result == COMPILED_ADVANCED
3434 end
3535
36+ unless RUBY_PLATFORM =~ /mswin|mingw/ # which won't work on windows
37+
3638 def test_jar_and_java_specifiation
3739 jar = Dir [ 'vendor/closure-compiler-*.jar' ] . first
3840 java = `which java` . strip
3941 compiler = Compiler . new ( :java => java , :jar_file => jar )
4042 assert compiler . compress ( ORIGINAL ) == COMPILED_SIMPLE
4143 end
44+
45+ end
4246
4347 def test_exceptions
4448 assert_raises ( Closure ::Error ) do
You can’t perform that action at this time.
0 commit comments