Skip to content

Commit df171be

Browse files
MSP-Gregkou
andauthored
Add --version cli option (#314)
Recently there have been some issues in Ruby head with binstubs. The following output is from https://github.com/ruby/ruby-dev-builder/actions/runs/15884945465/job/44794519509: Like to add `test-unit` to the CLI test, and having a version option makes for a simple check. ``` Run ruby test_files/cli_test.rb ───── CLI Test ───────────────── bundle ✅ 2.7.0.dev gem ✅ 3.7.0.dev irb ✅ 1.15.2 racc ✅ 1.8.1 rake ✅ 13.3.0 rbs ❌ missing binstub rdbg ❌ missing binstub rdoc ✅ 6.14.1 ruby 3.5.0dev (2025-06-25T17:13:11Z :detached: a1996b32a9) +PRISM [x86_64-linux] bad exit Error: Process completed with exit code 1. ``` Co-authored-by: Sutou Kouhei <kou@clear-code.com>
1 parent 572b28a commit df171be

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/test/unit/autorunner.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
require_relative "attribute-matcher"
77
require_relative "testcase"
88
require_relative "test-suite-thread-runner"
9+
require_relative "version"
910

1011
module Test
1112
module Unit
@@ -206,6 +207,8 @@ def process_args(args=ARGV)
206207

207208
def options
208209
@options ||= OptionParser.new do |o|
210+
o.version = VERSION
211+
209212
o.banner = "Test::Unit automatic runner."
210213
o.banner += "\nUsage: #{$0} [options] [-- untouched arguments]"
211214

0 commit comments

Comments
 (0)