Skip to content
Newer
Older
100644 27 lines (25 sloc) 742 Bytes
731b22d adding a crash testcase
Todd Fisher authored Jan 14, 2010
1 # From GICodeWarrior:
2 #
3 # $ ruby crash_curb.rb
4 # crash_curb.rb:7: [BUG] Segmentation fault
5 # ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
6 #
7 # Aborted
8 # crash_curb.rb:
9 # #!/usr/bin/ruby
10 # require 'rubygems'
11 # require 'curb'
12 #
13 # curl = Curl::Easy.new('http://example.com/')
14 # curl.multipart_form_post = true
15 # curl.http_post(Curl::PostField.file('test', 'test.xml'){'example data'})
16 # Ubuntu 9.10
17 # curb gem version 0.6.2.1
18 require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
19
20 class BugPostFieldsCrash < Test::Unit::TestCase
21 def test_crash
22 curl = Curl::Easy.new('http://example.com/')
23 curl.multipart_form_post = true
24 curl.http_post(Curl::PostField.file('test', 'test.xml'){'example data'})
25 end
26 end
Something went wrong with that request. Please try again.