Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve testing of Ruby options #7625

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ private void processArgument() {
}
}
default:
throw new MainExitException(1, "jruby: unknown option " + argument);
throw new MainExitException(1, "jruby: invalid option " + argument);
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions test/mri/excludes/TestRubyOptions.rb
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
exclude :test_assignment_in_conditional, "line numbers don't match MRI"
exclude :test_backtrace_limit, "needs investigation"
exclude :test_chdir, "needs investigation"
exclude :test_copyright, "needs investigation"
exclude :test_cwd_encoding, "can't do chdir and env yet #5145"
exclude :test_debug, "needs investigation"
exclude :test_disable, "needs investigation"
exclude :test_dump_insns_with_rflag, "MRI-specific format"
exclude :test_dump_parsetree_with_rflag, "MRI-specific format"
exclude :test_dump_syntax_with_rflag, "MRI-specific format"
exclude :test_dump_yydebug_with_rflag, "MRI-specific format"
exclude :test_encoding, "needs investigation"
exclude :test_eval, "needs investigation"
exclude :test_flag_in_shebang, "unreliable with our bash script"
exclude :test_frozen_string_literal, "needs investigation"
exclude :test_frozen_string_literal_debug, "needs investigation #4303"
exclude :test_indentation_check, "needs investigation"
exclude :test_indentation_check, "hangs"
exclude :test_invalid_option, "needs investigation"
exclude :test_kanji, "needs investigation"
exclude :test_notfound, "needs investigation"
exclude :test_program_name, "needs investigation"
exclude :test_require, "needs investigation"
exclude :test_rubyopt, "needs investigation"
exclude :test_safe_level, "needs investigation"
exclude :test_script_from_stdin, "uses io/console in ways we don't support yet"
exclude :test_script_is_directory, "uses io/console in ways we don't support yet"
exclude :test_search, "passes independently but fails in suite"
exclude :test_segv_loaded_features, "needs investigation"
exclude :test_segv_setproctitle, "needs investigation"
exclude :test_segv_test, "needs investigation"
exclude :test_separator, "needs investigation"
exclude :test_sflag, "needs investigation"
exclude :test_shadowing_variable, "needs investigation"
exclude :test_shebang, "needs investigation"
exclude :test_unmatching_glob, "needs investigation"
exclude :test_unused_variable, "needs investigation"
Expand Down
3 changes: 2 additions & 1 deletion test/mri/ruby/test_rubyoptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_debug
case RUBY_ENGINE
when 'jruby'
/^jruby #{q[RUBY_ENGINE_VERSION]} \(#{q[RUBY_VERSION]}\).*? \[#{
q[RbConfig::CONFIG["host_os"]]}-#{q[RbConfig::CONFIG["host_cpu"]]}\]$/
q[RbConfig::CONFIG["host_cpu"]]}-#{q[RbConfig::CONFIG["host_os"]]}\]$/
else
/^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? \[#{q[RUBY_PLATFORM]}\]$/
end
Expand Down Expand Up @@ -224,6 +224,7 @@ def test_version

return if RbConfig::CONFIG["MJIT_SUPPORT"] == 'no'
return if yjit_force_enabled?
return if RUBY_ENGINE != 'ruby'

[
%w(--version --mjit --disable=mjit),
Expand Down