Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

revisit the test skipped on windows - will run on newer windows versi…

…ons now (where `where` is available)
  • Loading branch information...
commit 663c7e70a725711742a5e8f2931785b0b5140689 1 parent 3e29a3a
@kares kares authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 test/unit/closure_compiler_test.rb
View
16 test/unit/closure_compiler_test.rb
@@ -32,16 +32,18 @@ def test_block_syntax
end
assert result == COMPILED_ADVANCED
end
-
- unless RUBY_PLATFORM =~ /mswin|mingw/ # which won't work on windows
def test_jar_and_java_specifiation
jar = Dir['vendor/closure-compiler-*.jar'].first
- java = `which java`.strip
- compiler = Compiler.new(:java => java, :jar_file => jar)
- assert compiler.compress(ORIGINAL) == COMPILED_SIMPLE
- end
-
+ unless java = ( `which java` rescue nil )
+ java = `where java` rescue nil # works on newer windows
+ end
+ if java
+ compiler = Compiler.new(:java => java.strip, :jar_file => jar)
+ assert compiler.compress(ORIGINAL) == COMPILED_SIMPLE
+ else
+ puts "could not `which/where java` skipping test"
+ end
end
def test_exceptions
Please sign in to comment.
Something went wrong with that request. Please try again.