diff --git a/Tests/LZ4Tests.swift b/Tests/LZ4Tests.swift index 4a591f14..698f4514 100644 --- a/Tests/LZ4Tests.swift +++ b/Tests/LZ4Tests.swift @@ -202,4 +202,15 @@ class LZ4Tests: XCTestCase { } } + func testLZ4Truncation() throws { + for i in 1...9 { + let testName = "test\(i)" + let testData = try Constants.data(forTest: testName, withType: LZ4Tests.testType) + for _ in 0..<100 { + let truncationIndex = Int.random(in: (testData.startIndex + 1)..