Sha256: 42a60d6aae59576a98af3864bcf1c755e40900f0d53b3e2baa324a5f63de3421

Contents?: true

Size: 857 Bytes

Versions: 21

Compression:

Stored size: 857 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))

require 'webrick'
class ::WEBrick::HTTPServer ; def access_log(config, req, res) ; end ; end
class ::WEBrick::BasicLog ; def log(level, data) ; end ; end

require 'curl'

class BugCrashOnDebug < Test::Unit::TestCase

  def test_on_debug
    server = WEBrick::HTTPServer.new( :Port => 9999 )
    server.mount_proc("/test") do|req,res|
      res.body = "hi"
      res['Content-Type'] = "text/html"
    end
    puts 'a'
    thread = Thread.new(server) do|srv|
      srv.start
    end
    puts 'b'
    c = Curl::Easy.new('http://127.0.0.1:9999/test')
    c.on_debug do|x|
      puts x.inspect
      raise "error" # this will get swallowed
    end
    c.perform
    puts 'c'
  ensure
    puts 'd'
    server.shutdown
    puts 'e'
    puts thread.exit
    puts 'f'
  end

end

#test_on_debug

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
curb-1.0.1 tests/bug_crash_on_debug.rb
curb-1.0.0 tests/bug_crash_on_debug.rb
curb-0.9.11 tests/bug_crash_on_debug.rb
curb-0.9.10 tests/bug_crash_on_debug.rb
curb-0.9.9 tests/bug_crash_on_debug.rb
curb-0.9.8 tests/bug_crash_on_debug.rb
curb-0.9.7 tests/bug_crash_on_debug.rb
curb-0.9.6 tests/bug_crash_on_debug.rb
curb-0.9.5 tests/bug_crash_on_debug.rb
curb-0.9.4 tests/bug_crash_on_debug.rb
curb-0.9.3 tests/bug_crash_on_debug.rb
curb-0.9.2 tests/bug_crash_on_debug.rb
curb-0.9.1 tests/bug_crash_on_debug.rb
curb-0.9.0 tests/bug_crash_on_debug.rb
curb-0.8.8 tests/bug_crash_on_debug.rb
curb-0.8.7 tests/bug_crash_on_debug.rb
gus-curb-0.8.7 tests/bug_crash_on_debug.rb
curb-0.8.6 tests/bug_crash_on_debug.rb
curb-0.8.5 tests/bug_crash_on_debug.rb
curb-0.8.4 tests/bug_crash_on_debug.rb