summaryrefslogtreecommitdiff
path: root/test/optparse
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-18 15:19:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-18 15:19:26 +0900
commitd4e52f672cf520d6929d22310a340e09fcb0e35d (patch)
treecf2d0ed4dc8275e28180e08ea4621c8b3833bdd8 /test/optparse
parent46fa301e82d50161fc7ec8e455d9d498b15b2c7a (diff)
Added no suggestion test case
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_did_you_mean.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/optparse/test_did_you_mean.rb b/test/optparse/test_did_you_mean.rb
index c5beaa4..2d0a9a6 100644
--- a/test/optparse/test_did_you_mean.rb
+++ b/test/optparse/test_did_you_mean.rb
@@ -15,6 +15,11 @@ class TestOptionParser::DidYouMean < TestOptionParser
::DidYouMean.formatter = @formatter
end
+ def test_no_suggestion
+ assert_raise_with_message(OptionParser::InvalidOption, "invalid option: --cuz") do
+ @opt.permute!(%w"--cuz")
+ end
+ end
def test_plain
::DidYouMean.formatter = ::DidYouMean::PlainFormatter.new