Skip to content

Commit

Permalink
windows: add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzaQ committed Nov 24, 2022
1 parent 050ed52 commit 071c4fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backtrace/test/crashpad_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def listen_one
}
unless defined?(DEBUG)
webrick_params = webrick_params.merge({
Logger: WEBrick::Log.new("/dev/null"),
Logger: WEBrick::Log.new(OS.windows? ? "NUL:" : "/dev/null"),
AccessLog: []
})
end
Expand Down
1 change: 1 addition & 0 deletions backtrace/test/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

require_relative 'test_linux' if OS.linux?
require_relative 'test_macos' if OS.mac?
require_relative 'test_windows' if OS.windows?
17 changes: 17 additions & 0 deletions backtrace/test/test_windows.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/ruby

require_relative 'crashpad_utils'

class TestLinux < Minitest::Test
def test_crashpad_uploads
result = Crashpad::perform_test executable: 'examples/windows/demo/Debug/demo_windows.exe'
assert result
assert result.has_key? :upload

payload = result[:upload].params

assert_equal payload.keys.sort, %w(format guid upload_file_minidump)

assert_equal payload['format'], 'minidump'
end
end

0 comments on commit 071c4fa

Please sign in to comment.