File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -941,7 +941,7 @@ def multi_workers_ready?
941
941
'-external-encoding' => '--external-encoding=utf-8' ,
942
942
'-internal-encoding' => '--internal-encoding=utf-8' ,
943
943
)
944
- test "-E option is set to RUBYOPT" do |opt |
944
+ test "-E option is set to RUBYOPT" do |base_opt |
945
945
conf = <<CONF
946
946
<source>
947
947
@type dummy
@@ -952,6 +952,7 @@ def multi_workers_ready?
952
952
</match>
953
953
CONF
954
954
conf_path = create_conf_file ( 'rubyopt_test.conf' , conf )
955
+ opt = base_opt . dup
955
956
opt << " #{ ENV [ 'RUBYOPT' ] } " if ENV [ 'RUBYOPT' ]
956
957
assert_log_matches (
957
958
create_cmdline ( conf_path ) ,
@@ -991,9 +992,14 @@ def multi_workers_ready?
991
992
</match>
992
993
CONF
993
994
conf_path = create_conf_file ( 'rubyopt_invalid_test.conf' , conf )
995
+ if Gem ::Version . create ( RUBY_VERSION ) >= Gem ::Version . create ( '3.3.0' )
996
+ expected_phrase = 'ruby: invalid switch in RUBYOPT'
997
+ else
998
+ expected_phrase = 'Invalid option is passed to RUBYOPT'
999
+ end
994
1000
assert_log_matches (
995
1001
create_cmdline ( conf_path ) ,
996
- 'Invalid option is passed to RUBYOPT' ,
1002
+ expected_phrase ,
997
1003
env : { 'RUBYOPT' => 'a' } ,
998
1004
)
999
1005
end
You can’t perform that action at this time.
0 commit comments