Skip to content

Commit 663c7e7

Browse files
committed
revisit the test skipped on windows - will run on newer windows versions now (where where is available)
1 parent 3e29a3a commit 663c7e7

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

test/unit/closure_compiler_test.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)