diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-06-16 23:55:47 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-06-19 02:24:13 +0000 |
commit | 10e4a9a5c271366a426056566edbdef3f4311c9d (patch) | |
tree | cc5058886a2101a3cc61356085de74de8832a257 /test/rubygems/test_gem_command_manager.rb | |
parent | af66b9b7203a22e6029872513c59a7284f381cf9 (diff) | |
download | ruby-10e4a9a5c271366a426056566edbdef3f4311c9d.tar.gz |
[rubygems/rubygems] Escape regexp metachacters or use `assert_include`
https://github.com/rubygems/rubygems/commit/6d445a85d7
Diffstat (limited to 'test/rubygems/test_gem_command_manager.rb')
-rw-r--r-- | test/rubygems/test_gem_command_manager.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb index 6e27e849bc..fe7f3da137 100644 --- a/test/rubygems/test_gem_command_manager.rb +++ b/test/rubygems/test_gem_command_manager.rb @@ -150,7 +150,7 @@ class TestGemCommandManager < Gem::TestCase end end - assert_match(/install isn't a directory./i, @ui.error) + assert_match(/install isn't a directory\./i, @ui.error) end def test_process_args_with_c_flag_path_not_found @@ -164,7 +164,7 @@ class TestGemCommandManager < Gem::TestCase end end - assert_match(/#{custom_start_point} isn't a directory./i, @ui.error) + assert_match(/#{Regexp.quote(custom_start_point)} isn't a directory\./i, @ui.error) end def test_process_args_bad_arg @@ -368,7 +368,7 @@ class TestGemCommandManager < Gem::TestCase end assert_equal "pew pew!\n", @ui.output - assert_match(/WARNING: foo command is deprecated. It will be removed in Rubygems [0-9]+/, @ui.error) + assert_match(/WARNING: foo command is deprecated\. It will be removed in Rubygems [0-9]+/, @ui.error) ensure Gem::Commands.send(:remove_const, :FooCommand) end @@ -393,7 +393,7 @@ class TestGemCommandManager < Gem::TestCase end assert_equal "pew pew!\n", @ui.output - assert_match(/WARNING: foo command is deprecated. It will be removed in Rubygems 9.9.9/, @ui.error) + assert_match(/WARNING: foo command is deprecated\. It will be removed in Rubygems 9\.9\.9/, @ui.error) ensure Gem::Commands.send(:remove_const, :FooCommand) end |