Sha256: 6d4b37436ab893ea189ea537db9e13a4d27ea8e7d93d4b008c46591686ad341e

Contents?: true

Size: 804 Bytes

Versions: 4

Compression:

Stored size: 804 Bytes

Contents

#!/usr/bin/env ruby

require 'optparse'

require_relative '../test/tool/test_builder'

options = {}

OptionParser.new do |opt|
  opt.banner = 'Usage: bin/gentest [file] [option]'
  opt.on('-m METHOD', 'Method name in the test file') do |m|
    options[:method] = m
  end
  opt.on('-c CLASS', 'Class name in the test file') do |c|
    options[:class] = c
  end
  opt.on('--open=FRONTEND', 'Start remote debugging with opening the network port.',
                            'Currently, only vscode is supported.') do |f|
    options[:open] = f.downcase
  end
  opt.parse!(ARGV)
end

exit if ARGV.empty?

if options[:open] == 'vscode'
  DEBUGGER__::DAPTestBuilder.new(ARGV, options[:method], options[:class]).start
else
  DEBUGGER__::LocalTestBuilder.new(ARGV, options[:method], options[:class]).start
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/debug-1.4.0/bin/gentest
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/debug-1.4.0/bin/gentest
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/debug-1.4.0/bin/gentest
debug-1.4.0 bin/gentest