     ]
   end
 
-  test "aggregates escaped, unterminated rows with different separators" do
+  test "aggregates unterminated escape sequences over rows with different separators" do
     stream = Stream.map(["a\t\"be", "c\td", "e\tf\"", "g\th"], &(&1))
     aggregated = stream |> LineAggregator.aggregate(separator: ?\t) |> Enum.into([])
     assert aggregated == [

    ]
  end

  test "aggregates escaped, unterminated rows only containing a linebreak" do
    stream = Stream.map(["a,\"", "\"", "c,d"], &(&1))
    aggregated = stream |> LineAggregator.aggregate |> Enum.into([])
    assert aggregated == [

    ]
  end

  test "fails on open escape sequences" do
    stream = Stream.map(["a,\"be\"\"", "c,d", "e,f\",\"super,cool\"", "g,h,i", "i,j,\"k", "k,l,m"], &(&1))
    assert_raise CorruptStreamError, fn ->
      stream |> LineAggregator.aggregate |> Stream.run
    end
  end

  test "fails on open escape sequences with escaped quotes" do
    stream = Stream.map(["a,\"\"\"be\"\"", "\"\"c,d"], &(&1))
    assert_raise CorruptStreamError, fn ->
      stream |> LineAggregator.aggregate |> Stream.run
    end
  end

end
