mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Fix compile errors in test code
This commit is contained in:
parent
3ffc3fb317
commit
362e1a5e14
@ -14,3 +14,10 @@ trait SanitizeHtml {
|
|||||||
def apply(bytes: ByteVector, charset: Option[Charset]): ByteVector
|
def apply(bytes: ByteVector, charset: Option[Charset]): ByteVector
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object SanitizeHtml {
|
||||||
|
|
||||||
|
val none: SanitizeHtml =
|
||||||
|
(bv, _) => bv
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -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(
|
val bombs = List(
|
||||||
ExampleFiles.bombs_20K_gray_jpeg,
|
ExampleFiles.bombs_20K_gray_jpeg,
|
||||||
|
@ -4,7 +4,7 @@ import java.nio.file.{Path, Paths}
|
|||||||
|
|
||||||
import cats.effect._
|
import cats.effect._
|
||||||
import docspell.common._
|
import docspell.common._
|
||||||
import docspell.convert.FileChecks
|
import docspell.convert._
|
||||||
import docspell.files.{ExampleFiles, TestFiles}
|
import docspell.files.{ExampleFiles, TestFiles}
|
||||||
import minitest.SimpleTestSuite
|
import minitest.SimpleTestSuite
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
@ -12,7 +12,7 @@ import java.nio.charset.StandardCharsets
|
|||||||
object ExternConvTest extends SimpleTestSuite with FileChecks {
|
object ExternConvTest extends SimpleTestSuite with FileChecks {
|
||||||
val blocker = TestFiles.blocker
|
val blocker = TestFiles.blocker
|
||||||
implicit val CS = TestFiles.CS
|
implicit val CS = TestFiles.CS
|
||||||
|
val utf8 = StandardCharsets.UTF_8
|
||||||
val logger = Logger.log4s[IO](org.log4s.getLogger)
|
val logger = Logger.log4s[IO](org.log4s.getLogger)
|
||||||
val target = Paths.get("target")
|
val target = Paths.get("target")
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ object ExternConvTest extends SimpleTestSuite with FileChecks {
|
|||||||
val wkCfg = WkHtmlPdfConfig(cfg, target)
|
val wkCfg = WkHtmlPdfConfig(cfg, target)
|
||||||
val p =
|
val p =
|
||||||
WkHtmlPdf
|
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),
|
ExampleFiles.letter_de_html.readURL[IO](8192, blocker),
|
||||||
storePdfHandler(dir.resolve("test.pdf"))
|
storePdfHandler(dir.resolve("test.pdf"))
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user