Sha256: 6628c7aec131061489a5f62e433256061818fededca6daf35b0fe7a2cd3ca601
Contents?: true
Size: 439 Bytes
Versions: 3
Compression:
Stored size: 439 Bytes
Contents
# frozen_string_literal: false require_relative 'test_optparse' class TestOptionParserCClass < TestOptionParser def test_no_argument flags = [] @opt.def_option("-[a-z]") {|x| flags << x} no_error {@opt.parse!(%w"-a")} assert_equal(%w"a", flags) end def test_required_argument flags = [] @opt.def_option("-[a-z]X") {|x| flags << x} no_error {@opt.parse!(%w"-a")} assert_equal(%w"a", flags) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cmd-optparse.rb-0.5.0 | test/optparse/test_cclass.rb |
cmd-optparse.rb-0.1.1 | test/optparse/test_cclass.rb |
cmd-optparse.rb-0.1.0 | test/optparse/test_cclass.rb |