import Foundation
import Testing
import ZIPFoundation
import LegadoCore
@testable import LegadoAppModels
@MainActor
struct EPUBReadingRegressionTests {
private func fixture(at root: URL) throws -> URL {
let url = root.appendingPathComponent("示例.epub")
let archive = try Archive(url: url, accessMode: .create)
let files = [
("mimetype", "application/epub+zip"),
("META-INF/container.xml", #"
第一章测试正文
"), ("last.xhtml", "第二章测试正文
") ] for (path, value) in files { let data = Data(value.utf8) try archive.addEntry(with: path, type: .file, uncompressedSize: Int64(data.count), compressionMethod: .deflate) { position, size in data.subdata(in: Int(position)..