summaryrefslogtreecommitdiff
path: root/test/optparse/test_getopts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/optparse/test_getopts.rb')
-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