Sha256: 7770425a6bafe566a6c2b34473a40f483658c5208d0157d7ba4439ad92edd813
Contents?: true
Size: 696 Bytes
Versions: 9
Compression:
Stored size: 696 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/getoptlong.rb # # Extracted Mon Sep 03 16:23:08 -0700 2007 # w/ Test Extraction Ratchet # 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
9 entries across 9 versions & 1 rubygems