Skip to content

Commit

Permalink
Merge pull request #1538 from kmuto/mute_stderr
Browse files Browse the repository at this point in the history
mute some stderr outputs in tests
  • Loading branch information
kmuto authored Aug 16, 2020
2 parents 2dd17cb + f45d557 commit 59d6267
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions test/test_idgxmlmaker_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def common_buildidgxml(bookdir, configfile, targetfile, option)

ruby_cmd = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) + RbConfig::CONFIG['EXEEXT']
Dir.chdir(@tmpdir1) do
_o, e, s = Open3.capture3("#{ruby_cmd} -S #{REVIEW_IDGXMLMAKER} #{option} #{configfile}")
STDERR.puts e unless e.empty?
_o, _e, s = Open3.capture3("#{ruby_cmd} -S #{REVIEW_IDGXMLMAKER} #{option} #{configfile}")
assert s.success?
end
assert File.exist?(File.join(@tmpdir1, targetfile))
Expand Down
4 changes: 4 additions & 0 deletions test/test_latexbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,9 @@ def path
item
end

io = StringIO.new
@builder.instance_eval{ @logger = ReVIEW::Logger.new(io) }

actual = compile_block("//indepimage[sample_img#&][sample photo]\n")
expected = <<-EOS
\\begin{reviewdummyimage}
Expand All @@ -1293,6 +1296,7 @@ def path
\\end{reviewdummyimage}
EOS
assert_equal expected, actual
assert_match(/WARN --: :1: image not bound: sample_img#&/, io.string)
end

def test_table
Expand Down
3 changes: 1 addition & 2 deletions test/test_textmaker_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def common_buildtext(bookdir, configfile, targetfile, option)

ruby_cmd = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) + RbConfig::CONFIG['EXEEXT']
Dir.chdir(@tmpdir1) do
_o, e, s = Open3.capture3("#{ruby_cmd} -S #{REVIEW_TEXTMAKER} #{option} #{configfile}")
STDERR.puts e unless e.empty?
_o, _e, s = Open3.capture3("#{ruby_cmd} -S #{REVIEW_TEXTMAKER} #{option} #{configfile}")
assert s.success?
end
assert File.exist?(File.join(@tmpdir1, targetfile))
Expand Down

0 comments on commit 59d6267

Please sign in to comment.