@@ -16,20 +16,16 @@ def test_dash_0_splits_records
1616 end if IS_JAR_EXECUTION
1717
1818 def test_dash_little_c_checks_syntax
19- with_jruby_shell_spawning do
20- with_temp_script ( "bad : code" ) do |s |
21- assert_match ( /SyntaxError/ , jruby ( "-c #{ s . path } 2>&1" ) )
22- assert_not_equal 0 , $?. exitstatus
23- end
19+ with_temp_script ( "bad : code" ) do |s |
20+ assert_match ( /SyntaxError/ , jruby ( "-c #{ s . path } 2>&1" ) )
21+ assert_not_equal 0 , $?. exitstatus
2422 end
2523 end
2624
2725 def test_dash_little_c_checks_syntax_only
28- with_jruby_shell_spawning do
29- with_temp_script ( %q{ puts "a" } ) do |s |
30- assert_match ( /Syntax OK/ , jruby ( " -c #{ s . path } 2>&1" ) . chomp )
31- assert_equal 0 , $?. exitstatus
32- end
26+ with_temp_script ( %q{ puts "a" } ) do |s |
27+ assert_match ( /Syntax OK/ , jruby ( " -c #{ s . path } 2>&1" ) . chomp )
28+ assert_equal 0 , $?. exitstatus
3329 end
3430 end
3531
@@ -158,20 +154,16 @@ def test_dash_big_C_error
158154 end
159155
160156 def test_dash_little_w_turns_warnings_on
161- with_jruby_shell_spawning do
162- assert_match ( /warning/ , `#{ RUBY } -v -e "defined? true" 2>&1` )
163- assert_equal 0 , $?. exitstatus
164- end
157+ assert_match ( /warning/ , `#{ RUBY } -v -e "defined? true" 2>&1` )
158+ assert_equal 0 , $?. exitstatus
165159 end
166160
167161 def test_dash_big_w_sets_warning_level
168- with_jruby_shell_spawning do
169- with_temp_script ( "defined? true" ) do |s |
170- assert_equal "" , jruby ( "-W1 #{ s . path } 2>&1" )
171- assert_equal 0 , $?. exitstatus
172- assert_match ( /warning/ , jruby ( "-W2 #{ s . path } 2>&1" ) )
173- assert_equal 0 , $?. exitstatus
174- end
162+ with_temp_script ( "defined? true" ) do |s |
163+ assert_equal "" , jruby ( "-W1 #{ s . path } 2>&1" )
164+ assert_equal 0 , $?. exitstatus
165+ assert_match ( /warning/ , jruby ( "-W2 #{ s . path } 2>&1" ) )
166+ assert_equal 0 , $?. exitstatus
175167 end
176168 end
177169
@@ -259,11 +251,9 @@ def test_with_interesting_file_names
259251 /test__/ , /test_U_D/ , /_P_U_S_D/ ]
260252
261253 names . each_with_index do |name , idx |
262- with_jruby_shell_spawning do
263- with_temp_script ( 'print __FILE__' , name ) do |s |
264- assert_match rgxes [ idx ] , jruby ( "#{ s . path } " )
265- assert_equal 0 , $?. exitstatus
266- end
254+ with_temp_script ( 'print __FILE__' , name ) do |s |
255+ assert_match rgxes [ idx ] , jruby ( "#{ s . path } " )
256+ assert_equal 0 , $?. exitstatus
267257 end
268258 end
269259 end
@@ -281,21 +271,17 @@ def test_blank_arg_ends_arg_processing
281271 # JRUBY-4288
282272 def test_case_insensitive_jruby
283273 weird_jruby = '"' + File . join ( [ RbConfig ::CONFIG [ 'bindir' ] , 'jRuBy' ] ) << RbConfig ::CONFIG [ 'EXEEXT' ] + '"'
284- with_jruby_shell_spawning do
285- res = `cmd.exe /c #{ weird_jruby } -e "puts 1"` . rstrip
286- assert_equal '1' , res
287- assert_equal 0 , $?. exitstatus
288- end
274+ res = `cmd.exe /c #{ weird_jruby } -e "puts 1"` . rstrip
275+ assert_equal '1' , res
276+ assert_equal 0 , $?. exitstatus
289277 end if WINDOWS
290278
291279 # JRUBY-4289
292280 def test_uppercase_exe
293281 weird_jruby = '"' + File . join ( [ RbConfig ::CONFIG [ 'bindir' ] , 'jRuBy' ] ) << '.ExE' + '"'
294- with_jruby_shell_spawning do
295- res = `#{ weird_jruby } -e "puts 1"` . rstrip
296- assert_equal '1' , res
297- assert_equal 0 , $?. exitstatus
298- end
282+ res = `#{ weird_jruby } -e "puts 1"` . rstrip
283+ assert_equal '1' , res
284+ assert_equal 0 , $?. exitstatus
299285 end if WINDOWS
300286
301287 # JRUBY-4290
0 commit comments