From 933d572d37b6fb6c2654d5c36fac96d6c18e6c8e Mon Sep 17 00:00:00 2001 From: Andrej Kolar Date: Mon, 15 Aug 2022 15:24:09 +0200 Subject: [PATCH] Remove example test --- Tests/PassGenTests/PassGenTests.swift | 47 --------------------------- 1 file changed, 47 deletions(-) delete mode 100644 Tests/PassGenTests/PassGenTests.swift diff --git a/Tests/PassGenTests/PassGenTests.swift b/Tests/PassGenTests/PassGenTests.swift deleted file mode 100644 index b6de7f6..0000000 --- a/Tests/PassGenTests/PassGenTests.swift +++ /dev/null @@ -1,47 +0,0 @@ -import XCTest -import class Foundation.Bundle - -final class PassGenTests: XCTestCase { - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct - // results. - - // Some of the APIs that we use below are available in macOS 10.13 and above. - guard #available(macOS 10.13, *) else { - return - } - - // Mac Catalyst won't have `Process`, but it is supported for executables. - #if !targetEnvironment(macCatalyst) - - let fooBinary = productsDirectory.appendingPathComponent("PassGen") - - let process = Process() - process.executableURL = fooBinary - - let pipe = Pipe() - process.standardOutput = pipe - - try process.run() - process.waitUntilExit() - - let data = pipe.fileHandleForReading.readDataToEndOfFile() - let output = String(data: data, encoding: .utf8) - - XCTAssertEqual(output, "Hello, world!\n") - #endif - } - - /// Returns path to the built products directory. - var productsDirectory: URL { - #if os(macOS) - for bundle in Bundle.allBundles where bundle.bundlePath.hasSuffix(".xctest") { - return bundle.bundleURL.deletingLastPathComponent() - } - fatalError("couldn't find the products directory") - #else - return Bundle.main.bundleURL - #endif - } -}