1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 18246:

* test/rss/: use PNG instead of zlib as binary data. [ruby-dev:35666]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2009-01-01 18:17:59 +00:00
parent 88655573fc
commit 202ac43838
5 changed files with 22 additions and 29 deletions

View file

@ -1,3 +1,7 @@
Fri Jan 2 03:08:47 2009 Kouhei Sutou <kou@cozmixng.org>
* test/rss/: use PNG instead of zlib as binary data. [ruby-dev:35666]
Tue Nov 11 01:07:32 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* configure.in: fix SEGV on Mac OS X 10.5.3 with --enable-pthread.

BIN
test/rss/dot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

View file

@ -557,20 +557,14 @@ EOA
def assert_atom_content_inline_other_text(generator)
_wrap_assertion do
require "zlib"
type = "application/zip"
type = "image/png"
assert_parse(generator.call(<<-EOA), :nothing_raised)
<content type="#{type}"/>
EOA
text = ""
char = "a"
100.times do |i|
text << char
char.succ!
end
base64_content = Base64.encode64(Zlib::Deflate.deflate(text))
png_file = File.join(File.dirname(__FILE__), "dot.png")
png = File.open(png_file, "rb") {|file| file.read}
base64_content = [png].pack("m").delete("\n")
[false, true].each do |with_space|
xml_content = base64_content
@ -591,7 +585,7 @@ EOA
assert(content.inline_other_base64?)
assert(!content.out_of_line?)
assert(!content.have_xml_content?)
assert_equal(text, Zlib::Inflate.inflate(content.content))
assert_equal(png, content.content)
xml = REXML::Document.new(content.to_s).root
assert_rexml_element([], {"type" => type}, base64_content, xml)

View file

@ -641,24 +641,17 @@ module RSS
def assert_atom_content_inline_other_base64_to_s(target_class)
_wrap_assertion do
require "zlib"
text = ""
char = "a"
100.times do |i|
text << char
char.succ!
end
type = "application/zip"
original_content = Zlib::Deflate.deflate(text)
type = "image/png"
png_file = File.join(File.dirname(__FILE__), "dot.png")
original_content = File.open(png_file, "rb") {|file| file.read}
content = target_class.new
content.type = type
content.content = original_content
xml = REXML::Document.new(content.to_s).root
assert_rexml_element([], {"type" => type},
Base64.encode64(original_content), xml)
[original_content].pack("m").delete("\n"),
xml)
end
end

View file

@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.7"
#define RUBY_RELEASE_DATE "2008-11-11"
#define RUBY_RELEASE_DATE "2009-01-02"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20081111
#define RUBY_PATCHLEVEL 73
#define RUBY_RELEASE_CODE 20090102
#define RUBY_PATCHLEVEL 74
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 11
#define RUBY_RELEASE_DAY 11
#define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 1
#define RUBY_RELEASE_DAY 2
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];
@ -29,3 +29,5 @@ RUBY_EXTERN const char *ruby_copyright;
#define RUBY_RELEASE_NUM RUBY_PATCHLEVEL