]> git.notmuchmail.org Git - sup/blobdiff - test/test_mbox_parsing.rb
Merge branch 'dlload-bugfix' into next
[sup] / test / test_mbox_parsing.rb
index 070b152e1e8f384f2a83bdde5835c28e6793f06b..32687e5f1559ee340ff572ca6e79b801deb19140 100644 (file)
@@ -6,7 +6,7 @@ require 'stringio'
 
 include Redwood
 
-class TestMessage < Test::Unit::TestCase
+class TestMBoxParsing < Test::Unit::TestCase
   def setup
   end
 
@@ -74,15 +74,19 @@ EOS
     end
   end
 
-  def test_ignore_empty_lines
+  def test_blank_lines
+    h = MBox.read_header StringIO.new("")
+    assert_equal nil, h["Message-Id"]
+  end
+
+  def test_empty_headers
     variants = [
-      "",
       "Message-Id:       \n",
       "Message-Id:\n",
     ]
     variants.each do |s|
       h = MBox.read_header StringIO.new(s)
-      assert_nil h["Message-Id"]
+      assert_equal "", h["Message-Id"]
     end
   end