Fix compile errors in test code

This commit is contained in:
Eike Kettner 2020-04-07 23:00:25 +02:00
parent 3ffc3fb317
commit 362e1a5e14
3 changed files with 11 additions and 4 deletions

View File

@ -14,3 +14,10 @@ trait SanitizeHtml {
def apply(bytes: ByteVector, charset: Option[Charset]): ByteVector
}
object SanitizeHtml {
val none: SanitizeHtml =
(bv, _) => bv
}

View File

@ -50,7 +50,7 @@ object ConversionTest extends SimpleTestSuite with FileChecks {
)
)
val conversion = Conversion.create[IO](convertConfig, blocker, logger)
val conversion = Conversion.create[IO](convertConfig, SanitizeHtml.none, blocker, logger)
val bombs = List(
ExampleFiles.bombs_20K_gray_jpeg,

View File

@ -4,7 +4,7 @@ import java.nio.file.{Path, Paths}
import cats.effect._
import docspell.common._
import docspell.convert.FileChecks
import docspell.convert._
import docspell.files.{ExampleFiles, TestFiles}
import minitest.SimpleTestSuite
import java.nio.charset.StandardCharsets
@ -12,7 +12,7 @@ import java.nio.charset.StandardCharsets
object ExternConvTest extends SimpleTestSuite with FileChecks {
val blocker = TestFiles.blocker
implicit val CS = TestFiles.CS
val utf8 = StandardCharsets.UTF_8
val logger = Logger.log4s[IO](org.log4s.getLogger)
val target = Paths.get("target")
@ -32,7 +32,7 @@ object ExternConvTest extends SimpleTestSuite with FileChecks {
val wkCfg = WkHtmlPdfConfig(cfg, target)
val p =
WkHtmlPdf
.toPDF[IO, Path](wkCfg, 8192, StandardCharsets.UTF_8, blocker, logger)(
.toPDF[IO, Path](wkCfg, 8192, utf8, SanitizeHtml.none, blocker, logger)(
ExampleFiles.letter_de_html.readURL[IO](8192, blocker),
storePdfHandler(dir.resolve("test.pdf"))
)