summaryrefslogtreecommitdiffstats
path: root/test/optparse
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-26 14:59:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-26 14:59:20 +0000
commitbc3d0f23bd0415ebefe63f818980b6deac5c3ff8 (patch)
tree2eb1a2e806f7bc519af80d2b56b858b27d4170b9 /test/optparse
parentfb891d545e5bd4ab64a44cb14c5b82776bdd57b0 (diff)
downloadruby-bc3d0f23bd0415ebefe63f818980b6deac5c3ff8.tar.gz
ruby-bc3d0f23bd0415ebefe63f818980b6deac5c3ff8.tar.xz
ruby-bc3d0f23bd0415ebefe63f818980b6deac5c3ff8.zip
* test/optparse/test_getopts.rb: added.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_getopts.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/optparse/test_getopts.rb b/test/optparse/test_getopts.rb
new file mode 100644
index 000000000..025adfbfc
--- /dev/null
+++ b/test/optparse/test_getopts.rb
@@ -0,0 +1,11 @@
+require 'test/unit'
+
+class TestOptionParser < Test::Unit::TestCase
+ def setup
+ @opt = OptionParser.new
+ end
+
+ def test_getopts
+ assert_equal({'a' => true}, @opt.getopts(['-a'], "a"))
+ end
+end