feat: Adds generate commands that call to pandoc to generate pdf, latex, and html files from a project.
This commit is contained in:
@@ -5,6 +5,7 @@ import Foundation
|
||||
@_spi(Internal) import PlaybookClient
|
||||
import ShellClient
|
||||
import Testing
|
||||
import TestSupport
|
||||
|
||||
@Suite("PlaybookClientTests")
|
||||
struct PlaybookClientTests {
|
||||
@@ -15,18 +16,17 @@ struct PlaybookClientTests {
|
||||
$0.fileClient = .liveValue
|
||||
$0.asyncShellClient = .liveValue
|
||||
} operation: {
|
||||
let tempDirectory = FileManager.default.temporaryDirectory
|
||||
let pathUrl = tempDirectory.appending(path: "playbook")
|
||||
let playbookClient = PlaybookClient.liveValue
|
||||
try await withTemporaryDirectory { tempDirectory in
|
||||
let pathUrl = tempDirectory.appending(path: "playbook")
|
||||
let playbookClient = PlaybookClient.liveValue
|
||||
|
||||
let configuration = Configuration(playbook: .init(directory: pathUrl.cleanFilePath))
|
||||
let configuration = Configuration(playbook: .init(directory: pathUrl.cleanFilePath))
|
||||
|
||||
try? FileManager.default.removeItem(at: pathUrl)
|
||||
try await playbookClient.installPlaybook(configuration)
|
||||
let exists = FileManager.default.fileExists(atPath: pathUrl.cleanFilePath)
|
||||
#expect(exists)
|
||||
|
||||
try FileManager.default.removeItem(at: pathUrl)
|
||||
try? FileManager.default.removeItem(at: pathUrl)
|
||||
try await playbookClient.installPlaybook(configuration)
|
||||
let exists = FileManager.default.fileExists(atPath: pathUrl.cleanFilePath)
|
||||
#expect(exists)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user