commit 9af083d7f6b97c0f5ebbdd9a42b58478a6f874b7 (patch)
parent 24b9f66 http_server: improve handling of client-triggerable socket errors
tree 1beb6864bed522b2fb900025f338690382994a6f
author Eric Wong <normalperson@yhbt.net> 2013-08-16 22:08:11 +0000
committer Eric Wong <normalperson@yhbt.net> 2013-08-17 01:09:46 +0000
test_util: fix encoding test for Ruby trunk (2.1.0dev)
As of r40610 in ruby trunk, internal encoding is ignored if
external coding is ASCII-8BIT (binary)
ref: r40610 http://svn.ruby-lang.org/repos/ruby/trunk
---
test/unit/test_util.rb | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/test/unit/test_util.rb b/test/unit/test_util.rb
index b8e4043..904d51c 100644
--- a/test/unit/test_util.rb
+++ b/test/unit/test_util.rb
@@ -80,7 +80,11 @@ class TestUtil < Test::Unit::TestCase
File.open(tmp_path, "a:#{ext.to_s}:#{int.to_s}") { |fp|
fp.sync = true
assert_equal ext, fp.external_encoding
- assert_equal int, fp.internal_encoding
+
+ if ext != Encoding::BINARY
+ assert_equal int, fp.internal_encoding
+ end
+
File.unlink(tmp_path)
assert ! File.exist?(tmp_path)
Unicorn::Util.reopen_logs
@@ -88,7 +92,9 @@ class TestUtil < Test::Unit::TestCase
assert File.exist?(tmp_path)
assert_equal fp.stat.inspect, File.stat(tmp_path).inspect
assert_equal ext, fp.external_encoding
- assert_equal int, fp.internal_encoding
+ if ext != Encoding::BINARY
+ assert_equal int, fp.internal_encoding
+ end
assert_equal(EXPECT_FLAGS, EXPECT_FLAGS & fp.fcntl(Fcntl::F_GETFL))
assert fp.sync
}
glossary
--------
Commit objects reference one tree, and zero or more parents.
Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.
Multiple parents means the commit is a merge.
Root commits have no ancestor. Note that it is
possible to have multiple root commits when merging independent histories.
Every commit references one top-level tree object.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).