We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c837de6 commit c78cfe2Copy full SHA for c78cfe2
Tests/EndToEndTests/DiagramSubcommandTests.swift
@@ -0,0 +1,21 @@
1
+import XCTest
2
+
3
+final class DiagramSubcommandTests: XCTestCase {
4
+ func testStandardOutput() throws {
5
+ let command = Bundle.productsDirectory.appendingPathComponent("swift-doc")
6
7
+ let outputDirectory = try temporaryDirectory()
8
+ defer { try? FileManager.default.removeItem(at: outputDirectory) }
9
10
+ try Process.run(command: command,
11
+ arguments: [
12
+ "diagram",
13
+ "Sources"
14
+ ]
15
+ ) { result in
16
+ XCTAssertEqual(result.terminationStatus, EXIT_SUCCESS)
17
+ XCTAssertEqual(result.output?.starts(with: "digraph {"), true)
18
+ XCTAssertEqual(result.error, "")
19
+ }
20
21
+}
0 commit comments