]> git.scottworley.com Git - tablify/commitdiff
Verify double-line-skip behavior without spacer rows
authorScott Worley <scottworley@scottworley.com>
Thu, 26 Sep 2024 03:52:08 +0000 (20:52 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 2 Oct 2024 09:40:47 +0000 (02:40 -0700)
src/lib.rs

index 73e517b14016e2a2681f422c4c173e4f20eb7fd5..e11f08b7f623f921b4df1ead0f429d318c7f6219 100644 (file)
@@ -410,6 +410,21 @@ mod tests {
                 })
             ]
         );
                 })
             ]
         );
+        assert_eq!(
+            read_rows(&b"foo\n\n\nbar\n"[..])
+                .flatten()
+                .collect::<Vec<_>>(),
+            vec![
+                Rowlike::Row(Row {
+                    label: "foo".to_owned(),
+                    entries: HashMap::new(),
+                }),
+                Rowlike::Row(Row {
+                    label: "bar".to_owned(),
+                    entries: HashMap::new(),
+                })
+            ]
+        );
         assert_eq!(
             read_rows(&b"foo\n \nbar\n"[..])
                 .flatten()
         assert_eq!(
             read_rows(&b"foo\n \nbar\n"[..])
                 .flatten()