File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,16 +32,18 @@ def test_block_syntax
3232 end
3333 assert result == COMPILED_ADVANCED
3434 end
35-
36- unless RUBY_PLATFORM =~ /mswin|mingw/ # which won't work on windows
3735
3836 def test_jar_and_java_specifiation
3937 jar = Dir [ 'vendor/closure-compiler-*.jar' ] . first
40- java = `which java` . strip
41- compiler = Compiler . new ( :java => java , :jar_file => jar )
42- assert compiler . compress ( ORIGINAL ) == COMPILED_SIMPLE
43- end
44-
38+ unless java = ( `which java` rescue nil )
39+ java = `where java` rescue nil # works on newer windows
40+ end
41+ if java
42+ compiler = Compiler . new ( :java => java . strip , :jar_file => jar )
43+ assert compiler . compress ( ORIGINAL ) == COMPILED_SIMPLE
44+ else
45+ puts "could not `which/where java` skipping test"
46+ end
4547 end
4648
4749 def test_exceptions
You can’t perform that action at this time.
0 commit comments