aboutsummaryrefslogtreecommitdiffstats
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
commit6b55a461145fa22ec9a48086183050397f04b047 (patch)
tree2eb1a2e806f7bc519af80d2b56b858b27d4170b9 /test/optparse
parent5da1743e3f5938eeb568956a020eea7cb7957821 (diff)
downloadruby-6b55a461145fa22ec9a48086183050397f04b047.tar.gz
* test/optparse/test_getopts.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/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 0000000000..025adfbfce
--- /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