summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-04-20 18:32:51 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 07:38:50 +0900
commit0b40279d7dcd741ee8401f6b5fd2edbd431ea0c4 (patch)
tree88f069e7fc46071a984005371965cab9e6013985 /test
parent2205ae8af5928c97a28f281f029bb3be290bf010 (diff)
Normalize heredoc case in rubygems code base
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3087
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb4
-rw-r--r--test/rubygems/test_gem_ext_cmake_builder.rb4
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb4
-rw-r--r--test/rubygems/test_gem_request_set.rb8
-rw-r--r--test/rubygems/test_gem_specification.rb24
5 files changed, 22 insertions, 22 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 4a0244c270..cd4812bc38 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -359,7 +359,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.options[:previous_version] = Gem::Version.new '2.0.2'
File.open 'History.txt', 'w' do |io|
- io.puts <<-History_txt
+ io.puts <<-HISTORY_TXT
# coding: UTF-8
=== #{Gem::VERSION} / 2013-03-26
@@ -377,7 +377,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
* Bug fixes:
* Yet more bugs fixed
- History_txt
+ HISTORY_TXT
end
use_ui @ui do
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb
index 05673e1b6d..899fde66ef 100644
--- a/test/rubygems/test_gem_ext_cmake_builder.rb
+++ b/test/rubygems/test_gem_ext_cmake_builder.rb
@@ -23,11 +23,11 @@ class TestGemExtCmakeBuilder < Gem::TestCase
def test_self_build
File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
- cmakelists.write <<-eo_cmake
+ cmakelists.write <<-EO_CMAKE
cmake_minimum_required(VERSION 2.6)
project(self_build NONE)
install (FILES test.txt DESTINATION bin)
- eo_cmake
+ EO_CMAKE
end
FileUtils.touch File.join(@ext, 'test.txt')
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index cdb006285d..2385772104 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -83,7 +83,7 @@ gems:
# Generated via:
# x = OpenSSL::PKey::DH.new(2048) # wait a while...
# x.to_s => pem
- TEST_KEY_DH2048 = OpenSSL::PKey::DH.new <<-_end_of_pem_
+ TEST_KEY_DH2048 = OpenSSL::PKey::DH.new <<-_END_OF_PEM_
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEA3Ze2EHSfYkZLUn557torAmjBgPsqzbodaRaGZtgK1gEU+9nNJaFV
G1JKhmGUiEDyIW7idsBpe4sX/Wqjnp48Lr8IeI/SlEzLdoGpf05iRYXC8Cm9o8aM
@@ -92,7 +92,7 @@ cfmVgoSEAo9YLBpzoji2jHkO7Q5IPt4zxbTdlmmGFLc/GO9q7LGHhC+rcMcNTGsM
NP0fuvVAIB158VnQ0liHSwcl6+9vE1mL0Jo/qEXQxl0+UdKDjaGfTsn6HIrwTnmJ
PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
-----END DH PARAMETERS-----
- _end_of_pem_
+ _END_OF_PEM_
def setup
@proxies = %w[https_proxy http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
diff --git a/test/rubygems/test_gem_request_set.rb b/test/rubygems/test_gem_request_set.rb
index f7a9191cd0..98efe5db48 100644
--- a/test/rubygems/test_gem_request_set.rb
+++ b/test/rubygems/test_gem_request_set.rb
@@ -396,9 +396,9 @@ ruby "0"
rs = Gem::RequestSet.new
tf = Tempfile.open 'gem.deps.rb' do |io|
- io.puts <<-gems_deps_rb
+ io.puts <<-GEMS_DEPS_RB
gem "#{name}", :git => "#{repository}"
- gems_deps_rb
+ GEMS_DEPS_RB
io.flush
@@ -459,10 +459,10 @@ ruby "0"
rs = Gem::RequestSet.new
tf = Tempfile.open 'gem.deps.rb' do |io|
- io.puts <<-gems_deps_rb
+ io.puts <<-GEMS_DEPS_RB
gem "#{a_name}", :path => "#{a_directory}"
gem "#{b_name}", :path => "#{b_directory}"
- gems_deps_rb
+ GEMS_DEPS_RB
io.flush
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 875d27761c..e0568506c5 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -3122,10 +3122,10 @@ Please report a bug if this causes problems.
@a1.validate
end
- assert_match <<-warning, @ui.error
+ assert_match <<-WARNING, @ui.error
WARNING: licenses is empty, but is recommended. Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
- warning
+ WARNING
end
def test_removed_methods
@@ -3151,10 +3151,10 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
@a1.validate
end
- assert_match <<-warning, @ui.error
+ assert_match <<-WARNING, @ui.error
WARNING: license value 'BSD' is invalid. Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
- warning
+ WARNING
end
def test_validate_license_values_plus
@@ -3198,14 +3198,14 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
@a1.validate
end
- assert_match <<-warning, @ui.error
+ assert_match <<-WARNING, @ui.error
WARNING: license value 'GPL-2.0+ FOO' is invalid. Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
- warning
- assert_match <<-warning, @ui.error
+ WARNING
+ assert_match <<-WARNING, @ui.error
WARNING: license value 'GPL-2.0 FOO' is invalid. Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
- warning
+ WARNING
end
def test_validate_license_with_invalid_exception
@@ -3216,10 +3216,10 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
@a1.validate
end
- assert_match <<-warning, @ui.error
+ assert_match <<-WARNING, @ui.error
WARNING: license value 'GPL-2.0+ WITH Autocofn-exception-2.0' is invalid. Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
- warning
+ WARNING
end
def test_validate_license_gives_suggestions
@@ -3230,11 +3230,11 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
@a1.validate
end
- assert_match <<-warning, @ui.error
+ assert_match <<-WARNING, @ui.error
WARNING: license value 'ruby' is invalid. Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
Did you mean 'Ruby'?
- warning
+ WARNING
end
def test_validate_empty_files