about summary refs log tree commit homepage
path: root/test/unit/test_response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_response.rb')
-rw-r--r--test/unit/test_response.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb
index 5d60594..c30a141 100644
--- a/test/unit/test_response.rb
+++ b/test/unit/test_response.rb
@@ -17,6 +17,17 @@ class ResponseTest < Test::Unit::TestCase
     assert out.length > 0, "output didn't have data"
   end
 
+  def test_response_OFS_set
+    old_ofs = $,
+    $, = "\f\v"
+    out = StringIO.new
+    HttpResponse.write(out,[200, {"X-Whatever" => "stuff"}, ["cool"]])
+    resp = out.read
+    assert ! resp.include?("\f\v"), "output didn't use $, ($OFS)"
+    ensure
+      $, = old_ofs
+  end
+
   def test_response_200
     io = StringIO.new
     HttpResponse.write(io, [200, {}, []])