diff --git a/SwiftCSVTests/CSVTests.swift b/SwiftCSVTests/CSVTests.swift index 521b0e2..9e744e9 100644 --- a/SwiftCSVTests/CSVTests.swift +++ b/SwiftCSVTests/CSVTests.swift @@ -108,4 +108,13 @@ class CSVTests: XCTestCase { XCTAssertEqual(expected[index], row) } } + + func testThrowsOnInvalidData() { + do { + _ = try CSV(string: "\n\n\n \n ", delimiter: ",", loadColumns: false) + XCTFail("Expected to throw") + } catch { + XCTAssert(error is CSVParseError) + } + } }