File: bug_crash_on_debug.rb

package info (click to toggle)
ruby-curb 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 860 kB
  • sloc: ansic: 5,798; ruby: 4,466; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))

class BugCrashOnDebug < Test::Unit::TestCase
  include BugTestServerSetupTeardown

  def test_on_debug
    c = Curl::Easy.new("http://127.0.0.1:#{@port}/test")
    did_raise = false
    did_call = false
    begin
      c.on_success do|x|
        did_call = true
        raise "error" # this will get swallowed
      end
      c.perform
    rescue => e
      did_raise = true
    end
    assert did_raise
    assert did_call
  end

end

#test_on_debug