summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-09 11:52:44 +0100
committergit <svn-admin@ruby-lang.org>2021-11-09 21:21:35 +0900
commit0d3898ec7b94b737fd9e0a9df1d0a944a9709564 (patch)
tree11e5178aedd4efba62c0696f055916903d19d93f /test/rubygems
parentba3dfe6efe958b31f43b34c4e942d69be938cc43 (diff)
[rubygems/rubygems] Remove more unused stuff from make command parsing
https://github.com/rubygems/rubygems/commit/eba7d173d4
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/helper.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb
index f2644d7eff..1d27baad1f 100644
--- a/test/rubygems/helper.rb
+++ b/test/rubygems/helper.rb
@@ -245,16 +245,14 @@ class Gem::TestCase < Test::Unit::TestCase
output.scan(/^#{Regexp.escape make_command}(?:[[:blank:]].*)?$/)
end
- def parse_make_command_line(line)
+ def parse_make_command_line_targets(line)
args = line.sub(/^#{Regexp.escape make_command}/, "").shellsplit
targets = []
- macros = {}
args.each do |arg|
case arg
when /\A(\w+)=/
- macros[$1] = $'
else
targets << arg
end
@@ -262,11 +260,7 @@ class Gem::TestCase < Test::Unit::TestCase
targets << '' if targets.empty?
- {
- :command => make_command,
- :targets => targets,
- :macros => macros,
- }
+ targets
end
def assert_contains_make_command(target, output, msg = nil)
@@ -287,9 +281,9 @@ class Gem::TestCase < Test::Unit::TestCase
end
assert scan_make_command_lines(output).any? {|line|
- make = parse_make_command_line(line)
+ targets = parse_make_command_line_targets(line)
- if make[:targets].include?(target)
+ if targets.include?(target)
true
else
false