ruby-changes:58329
From: MSP-Greg <ko1@a...>
Date: Mon, 21 Oct 2019 09:54:14 +0900 (JST)
Subject: [ruby-changes:58329] 71ffe40a44 (master): test/optparse/test_did_you_mean.rb - fix suggestion order
https://git.ruby-lang.org/ruby.git/commit/?id=71ffe40a44 From 71ffe40a447a17a1c3388374b7c9979c826b131d Mon Sep 17 00:00:00 2001 From: MSP-Greg <MSP-Greg@u...> Date: Sun, 20 Oct 2019 18:30:42 -0500 Subject: test/optparse/test_did_you_mean.rb - fix suggestion order diff --git a/test/optparse/test_did_you_mean.rb b/test/optparse/test_did_you_mean.rb index 19bb4b9..57fa1e9 100644 --- a/test/optparse/test_did_you_mean.rb +++ b/test/optparse/test_did_you_mean.rb @@ -27,7 +27,7 @@ class TestOptionParser::DidYouMean < TestOptionParser https://github.com/ruby/ruby/blob/trunk/test/optparse/test_did_you_mean.rb#L27 end def test_plain - assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\nDid you mean\?\s+baz\s+bar\Z/) do + assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\nDid you mean\?\s+bar\s+baz\Z/) do @opt.permute!(%w"--baa") end end @@ -35,13 +35,13 @@ class TestOptionParser::DidYouMean < TestOptionParser https://github.com/ruby/ruby/blob/trunk/test/optparse/test_did_you_mean.rb#L35 def test_verbose require 'did_you_mean/formatters/verbose_formatter' ::DidYouMean.formatter = ::DidYouMean::VerboseFormatter.new - assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\n\s+Did you mean\?\s+baz\s+bar\s*\Z/) do + assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\n\s+Did you mean\?\s+bar\s+baz\s*\Z/) do @opt.permute!(%w"--baa") end end def test_ambiguos - assert_raise_with_message(OptionParser::AmbiguousOption, /ambiguous option: --ba\nDid you mean\?\s+baz\s+bar\Z/) do + assert_raise_with_message(OptionParser::AmbiguousOption, /ambiguous option: --ba\nDid you mean\?\s+bar\s+baz\Z/) do @opt.permute!(%w"--ba") end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/