From dd9cfbb5dbf127ce5edd0c8870db6f35642631c9 Mon Sep 17 00:00:00 2001 From: Giacomo Cavalieri Date: Sun, 27 Oct 2024 15:27:52 +0100 Subject: [PATCH] add test for line with different number of fields --- test/gsv_test.gleam | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/gsv_test.gleam b/test/gsv_test.gleam index ea69529..18f463e 100644 --- a/test/gsv_test.gleam +++ b/test/gsv_test.gleam @@ -130,6 +130,14 @@ pub fn escaped_field_with_escaped_double_quotes_test() { |> should.equal([["escaped double quote -> \""]]) } +pub fn rows_with_different_number_of_fields_test() { + "three,fields,woo +only,two" + |> gsv.to_lists + |> should.be_ok + |> should.equal([["three", "fields", "woo"], ["only", "two"]]) +} + // --- DICT PARSING ------------------------------------------------------------ pub fn headers_test() {