Sha256: 467531c92c1bbe72c5e6c67d884c7244de5392465d41338087d0536ffe336185
Contents?: true
Size: 450 Bytes
Versions: 3
Compression:
Stored size: 450 Bytes
Contents
# Test facets/getoptlong.rb require 'facets/getoptlong.rb' require 'test/unit' class TestGetoptShort < Test::Unit::TestCase def test_dsl ARGV.replace(['foo', '--expect', 'A', '-h', 'nothing']) opts = GetoptLong.new do reqs '--expect', '-x' flag '--help', '-h' end ch = {} opts.each { |opt, arg| ch[opt] = arg } assert_equal( 'A', ch['--expect'] ) assert_equal( '', ch['--help'] ) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-2.2.0 | test/unit/test_getoptlong.rb |
facets-2.1.3 | test/unit/test_getoptlong.rb |
facets-2.2.1 | test/unit/test_getoptlong.rb |