Close stream properly in test

This commit is contained in:
Marvin Elsen 2024-09-24 10:41:26 +02:00
parent ebf608b2fa
commit 9fda246045
Signed by: marvinelsen
GPG Key ID: 820672408CC318C2

View File

@ -30,8 +30,11 @@ class RegexCedictParserTest : ShouldSpec({
val cedictFileStream = GZIPInputStream(javaClass.getResourceAsStream(cedictFilePath))
val cedictParser = RegexCedictParser()
cedictFileStream.use {
val cedictEntries = cedictParser.parseCedict(cedictFileStream)
cedictEntries.toList().size shouldBe 122_508
}
}
})