about summary refs log tree commit homepage
path: root/test/unit/test_tee_input.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_tee_input.rb')
-rw-r--r--test/unit/test_tee_input.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/test_tee_input.rb b/test/unit/test_tee_input.rb
index e69c8f1..3766e1f 100644
--- a/test/unit/test_tee_input.rb
+++ b/test/unit/test_tee_input.rb
@@ -267,6 +267,14 @@ class TestTeeInput < Test::Unit::TestCase
     assert_equal "World", @env['HTTP_HELLO']
   end
 
+  def test_gets_read_mix
+    r = init_request("hello\nasdfasdf")
+    ti = Unicorn::TeeInput.new(@rd, r)
+    assert_equal "hello\n", ti.gets
+    assert_equal "asdfasdf", ti.read(9)
+    assert_nil ti.read(9)
+  end
+
 private
 
   def init_request(body, size = nil)