summaryrefslogtreecommitdiff
path: root/test/optparse
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-15 17:22:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-15 17:31:11 +0900
commitc9b28fd7ae5c5a79a74afebd5b191cfd2f31a65f (patch)
tree1d6fbae627f3cacb8c781fa9720235e1b1cc801b /test/optparse
parentf54aa6c5b286b2b44bcdb1958fc9b1ebfce3559e (diff)
Allow --enable/--disable options to take an argument
[Bug #15850]
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_autoconf.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/optparse/test_autoconf.rb b/test/optparse/test_autoconf.rb
index 3be4a4c..45f2ba0 100644
--- a/test/optparse/test_autoconf.rb
+++ b/test/optparse/test_autoconf.rb
@@ -32,6 +32,13 @@ class TestOptionParser::AutoConf < Test::Unit::TestCase
assert_equal(true, @bar)
end
+ def test_enable_value
+ @opt.parse!(%w"--enable-foo=A")
+ assert_equal("A", @foo)
+ @opt.parse!(%w"--enable-bar=B")
+ assert_equal("B", @bar)
+ end
+
def test_disable
@opt.parse!(%w"--disable-foo")
assert_equal(false, @foo)