From fa70e419dd6c2fce71bfc6e07bb352186240b3b6 Mon Sep 17 00:00:00 2001 From: Kare Morstol Date: Tue, 21 Feb 2017 22:09:00 +0100 Subject: [PATCH] Enable building for iOS. Just the Stream part. So FileSmith can use it. The rest cannot build on iOS because it uses Process. Move the Stream files into its own directory. --- Sources/SwiftShell/Bash.swift | 4 + Sources/SwiftShell/Command.swift | 10 +- Sources/SwiftShell/Context.swift | 4 + Sources/SwiftShell/FileHandle.swift | 38 - Sources/SwiftShell/Files.swift | 4 + Sources/SwiftShell/Stream.swift | 186 ---- .../{General => Stream}/Lazy-split.swift | 60 +- Sources/SwiftShell/Stream/Stream.swift | 212 ++++ Sources/SwiftShell/String.swift | 4 + SwiftShell.xcodeproj/Configs/Project.xcconfig | 7 - ...ite_Info.plist => GeneralTests_Info.plist} | 0 ...uite_Info.plist => StreamTests_Info.plist} | 0 .../SwiftShellTests_Info.plist | 25 + SwiftShell.xcodeproj/project.pbxproj | 935 ++++++++++++------ .../xcschemes/SwiftShell-iOS.xcscheme | 113 +++ .../xcschemes/SwiftShell.xcscheme | 50 +- Tests/LinuxMain.swift | 1 + .../Collection_Tests.swift | 0 .../FileHandle_Tests.swift | 0 .../Stream_Tests.swift | 8 +- Tests/SwiftShellTests/Command_Tests.swift | 5 +- Tests/SwiftShellTests/Context_Tests.swift | 3 +- 22 files changed, 1082 insertions(+), 587 deletions(-) delete mode 100755 Sources/SwiftShell/Stream.swift rename Sources/SwiftShell/{General => Stream}/Lazy-split.swift (53%) create mode 100644 Sources/SwiftShell/Stream/Stream.swift delete mode 100644 SwiftShell.xcodeproj/Configs/Project.xcconfig rename SwiftShell.xcodeproj/{GeneralTestSuite_Info.plist => GeneralTests_Info.plist} (100%) rename SwiftShell.xcodeproj/{SwiftShellTestSuite_Info.plist => StreamTests_Info.plist} (100%) create mode 100644 SwiftShell.xcodeproj/SwiftShellTests_Info.plist create mode 100644 SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme rename Tests/{GeneralTests => StreamTests}/Collection_Tests.swift (100%) rename Tests/{SwiftShellTests => StreamTests}/FileHandle_Tests.swift (100%) rename Tests/{SwiftShellTests => StreamTests}/Stream_Tests.swift (94%) diff --git a/Sources/SwiftShell/Bash.swift b/Sources/SwiftShell/Bash.swift index 7789635..828a157 100644 --- a/Sources/SwiftShell/Bash.swift +++ b/Sources/SwiftShell/Bash.swift @@ -5,6 +5,8 @@ * */ +#if !(os(iOS) || os(tvOS) || os(watchOS)) + import Foundation // MARK: Bash @@ -77,3 +79,5 @@ Run bash command and print output and errors. public func runAndPrint (bash bashcommand: String) throws { return try main.runAndPrint(bash: bashcommand) } + +#endif diff --git a/Sources/SwiftShell/Command.swift b/Sources/SwiftShell/Command.swift index 1884908..518a733 100755 --- a/Sources/SwiftShell/Command.swift +++ b/Sources/SwiftShell/Command.swift @@ -5,9 +5,11 @@ * */ +#if !(os(iOS) || os(tvOS) || os(watchOS)) + import Foundation -#if !os(macOS) +#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) typealias Process = Task #endif @@ -213,11 +215,11 @@ public final class AsyncShellTask { let outpipe = Pipe() process.standardOutput = outpipe - stdout = FileHandleStream(outpipe.fileHandleForReading) + stdout = FileHandleStream(outpipe.fileHandleForReading, encoding: main.encoding) let errorpipe = Pipe() process.standardError = errorpipe - stderror = FileHandleStream(errorpipe.fileHandleForReading) + stderror = FileHandleStream(errorpipe.fileHandleForReading, encoding: main.encoding) do { try process.launchThrowably() @@ -336,3 +338,5 @@ Run executable and print output and errors. public func runAndPrint (_ executable: String, _ args: Any ...) throws { return try main.runAndPrint(executable, args) } + +#endif diff --git a/Sources/SwiftShell/Context.swift b/Sources/SwiftShell/Context.swift index 57773e6..dc3426e 100755 --- a/Sources/SwiftShell/Context.swift +++ b/Sources/SwiftShell/Context.swift @@ -5,6 +5,8 @@ * */ +#if !(os(iOS) || os(tvOS) || os(watchOS)) + import Foundation public protocol ShellContextType: CustomDebugStringConvertible { @@ -153,3 +155,5 @@ extension MainShellContext: ShellRunnable { } public let main = MainShellContext() + +#endif diff --git a/Sources/SwiftShell/FileHandle.swift b/Sources/SwiftShell/FileHandle.swift index eb87aa2..14283f8 100755 --- a/Sources/SwiftShell/FileHandle.swift +++ b/Sources/SwiftShell/FileHandle.swift @@ -7,44 +7,6 @@ import Foundation -extension FileHandle { - - public func readSome (encoding: String.Encoding = main.encoding) -> String? { - let data = self.availableData - - guard data.count > 0 else { return nil } - guard let result = String(data: data, encoding: encoding) else { - exit(errormessage: "Could not convert binary data to text.") - } - - return result - } - - public func read (encoding: String.Encoding = main.encoding) -> String { - let data = self.readDataToEndOfFile() - - guard let result = String(data: data, encoding: encoding) else { - exit(errormessage: "Could not convert binary data to text.") - } - - return result - } -} - -extension FileHandle { - - public func write (_ x: T, encoding: String.Encoding = main.encoding) { - let text = String(describing: x) -#if !os(macOS) - guard !text.isEmpty else {return} -#endif - guard let data = text.data(using: encoding, allowLossyConversion:false) else { - exit(errormessage: "Could not convert text to binary data.") - } - self.write(data) - } -} - #if os(macOS) extension FileHandle { /** Returns '.nullDevice'. 'nullDevice' has not been implemented yet in Swift Foundation. */ diff --git a/Sources/SwiftShell/Files.swift b/Sources/SwiftShell/Files.swift index 200b86c..b4d24ea 100755 --- a/Sources/SwiftShell/Files.swift +++ b/Sources/SwiftShell/Files.swift @@ -5,6 +5,8 @@ * */ +#if !(os(iOS) || os(tvOS) || os(watchOS)) + import Foundation /** The default FileManager */ @@ -87,3 +89,5 @@ public func open (forWriting path: String, overwrite: Bool = false, encoding: St let fixedpath = path.hasPrefix("~") ? NSString(string: path).expandingTildeInPath : path return try open(forWriting: URL(fileURLWithPath: fixedpath, isDirectory: false), overwrite: overwrite, encoding: encoding) } + +#endif diff --git a/Sources/SwiftShell/Stream.swift b/Sources/SwiftShell/Stream.swift deleted file mode 100755 index 40b71e3..0000000 --- a/Sources/SwiftShell/Stream.swift +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Released under the MIT License (MIT), http://opensource.org/licenses/MIT -* -* Copyright (c) 2015 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com) -* -*/ - -import Foundation - -/** A stream of text. Does as much as possible lazily. */ -public protocol ReadableStream : class, TextOutputStreamable, ShellRunnable { - - var filehandle: FileHandle {get} - var encoding: String.Encoding {get set} - - /** - Whatever amount of text the stream feels like providing. - If the source is a file this will read everything at once. - - - returns: more text from the stream, or nil if we have reached the end. - */ - func readSome () -> String? - - /** Read everything at once. */ - func read () -> String -} - -extension ReadableStream { - - /** Split stream lazily into lines. */ - public func lines () -> LazySequence> { - return AnySequence(PartialSourceLazySplitSequence({self.readSome()?.characters}, separator: "\n").map { String($0) }).lazy - } - - // ShellRunnable - public var shellcontext: ShellContextType { - var context = ShellContext(main) - context.stdin = self - return context - } - - // TextOutputStreamable - public func write(to target: inout Target) { - while let text = self.readSome() { target.write(text) } - } -} - -class FileHandleStream { - public let filehandle: FileHandle - public var encoding: String.Encoding - - public init (_ filehandle: FileHandle, encoding: String.Encoding = main.encoding) { - self.filehandle = filehandle - self.encoding = encoding - } -} - -extension FileHandleStream: ReadableStream { - - public func readSome () -> String? { - return filehandle.readSome(encoding: encoding) - } - - public func read () -> String { - return filehandle.read(encoding: encoding) - } -} - -extension FileHandleStream: CustomDebugStringConvertible { - /* A textual representation of this instance, suitable for debugging. */ - public var debugDescription: String { - return "ReadableStream(fd: \(filehandle.fileDescriptor), encoding: \(encoding))" - } -} - -#if os(macOS) -extension ReadableStream { - - /** - `handler` will be called whenever there is new output available. - Pass `nil` to remove any preexisting handlers. - - - note: if the stream is read from outside of the handler, or more than once inside - the handler, it may be called once when stream is closed and empty. - */ - public func onOutput ( handler: ((ReadableStream) -> ())? ) { - guard let handler = handler else { - filehandle.readabilityHandler = nil - return - } - filehandle.readabilityHandler = { [unowned self] _ in - handler(self) - } - } - - - /** - `handler` will be called whenever there is new text output available. - Pass `nil` to remove any preexisting handlers. - */ - public func onStringOutput ( handler: ((String) -> ())? ) { - if let h = handler { - filehandle.readabilityHandler = { (FileHandle) in - if let output = self.readSome() { - h(output) - } - } - } else { - filehandle.readabilityHandler = nil - } - } -} -#endif - - -/** An output stream, like standard output or a writeable file. */ -public protocol WritableStream : class, TextOutputStream { - - var filehandle: FileHandle { get } - var encoding: String.Encoding {get set} - - /** Write the textual representation of `x` to the stream. */ - func write (_ x: T) - - /** Close the stream. Must be called on local streams when finished writing. */ - func close () -} - -extension WritableStream { - - /** - Writes the textual representations of the given items into the stream. - Works exactly the same way as the built-in `print`. - */ - public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { - var iterator = items.lazy.map(String.init(describing:)).makeIterator() - iterator.next().map(write) - while let item = iterator.next() { - write(separator) - write(item) - } - write(terminator) - } -} - -extension FileHandleStream: WritableStream { - - public func write (_ x: T) { - if filehandle.fileDescriptor == STDOUT_FILENO { - print(x, terminator: "") - } else { - filehandle.write(x, encoding: encoding) - } - } - - public func close () { - filehandle.closeFile() - } -} - -/** Singleton WritableStream used only for `print`ing to stdout with the default main.stdout. */ -internal class StdoutStream: WritableStream { - public var filehandle: FileHandle { - return FileHandle.standardOutput - } - - public var encoding: String.Encoding = main.encoding - - private init () { } - - static var `default`: StdoutStream { return StdoutStream() } - - public func write (_ x: T) { - print(x, terminator: "") - } - - public func close () {} -} - -/** Create a pair of streams. What is written to the 1st one can be read from the 2nd one. */ -public func streams () -> (WritableStream, ReadableStream) { - let pipe = Pipe() - return (FileHandleStream(pipe.fileHandleForWriting), FileHandleStream(pipe.fileHandleForReading)) -} - - diff --git a/Sources/SwiftShell/General/Lazy-split.swift b/Sources/SwiftShell/Stream/Lazy-split.swift similarity index 53% rename from Sources/SwiftShell/General/Lazy-split.swift rename to Sources/SwiftShell/Stream/Lazy-split.swift index 76b4107..1fda4c4 100644 --- a/Sources/SwiftShell/General/Lazy-split.swift +++ b/Sources/SwiftShell/Stream/Lazy-split.swift @@ -1,41 +1,47 @@ -/* -* Released under the MIT License (MIT), http://opensource.org/licenses/MIT -* -* Copyright (c) 2015 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com) -* -*/ +// +// Released under the MIT License (MIT), http://opensource.org/licenses/MIT +// +// Copyright (c) 2015 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com) +// extension Collection where Iterator.Element: Equatable { - /** - Return everything before the first occurrence of ‘separator’ as 'head', and everything after it as 'tail'. - Including empty sequences if ‘separator’ is first or last. - - If ‘separator’ is not found then ‘head’ contains everything and 'tail' is nil. - */ - public func splitOnce (separator: Iterator.Element) -> (head: SubSequence, tail: SubSequence?) { + /// Returns everything before the first occurrence of ‘separator’ as 'head', and everything after it as 'tail'. + /// Including empty sequences if ‘separator’ is first or last. + /// + /// If ‘separator’ is not found then ‘head’ contains everything and 'tail' is nil. + func splitOnce (separator: Iterator.Element) -> (head: SubSequence, tail: SubSequence?) { guard let nextindex = index(of: separator) else { return (self[startIndex..: IteratorProtocol, LazySequenceProtocol where Base.Iterator.Element: Equatable, Base.SubSequence: Collection, Base.SubSequence.Iterator.Element==Base.Iterator.Element, Base.SubSequence==Base.SubSequence.SubSequence { - fileprivate var remaining: Base.SubSequence? - private let separator: Base.Generator.Element - private let allowEmptySlices: Bool + public fileprivate(set) var remaining: Base.SubSequence? + public let separator: Base.Generator.Element + public let allowEmptySlices: Bool + /// Creates a lazy sequence by splitting a Collection repeatedly. + /// + /// - Parameters: + /// - base: The Collection to split. + /// - separator: The element of `base` to split over. + /// - allowEmptySlices: If there are two or more separators in a row, or `base` begins or ends with + /// a separator, should empty slices be emitted? Defaults to false. public init (_ base: Base, separator: Base.Iterator.Element, allowEmptySlices: Bool = false) { self.separator = separator self.remaining = base[base.startIndex.. Base.SubSequence? { guard let remaining = self.remaining else { return nil } let (head, tail) = remaining.splitOnce(separator: separator) @@ -49,15 +55,22 @@ extension LazyCollectionProtocol where Elements.Iterator.Element: Equatable, Elements.SubSequence.Iterator.Element==Elements.Iterator.Element, Elements.SubSequence==Elements.SubSequence.SubSequence { + + /// Creates a lazy sequence by splitting this Collection repeatedly. + /// + /// - Parameters: + /// - separator: The element of this collection to split over. + /// - allowEmptySlices: If there are two or more separators in a row, or this Collection begins or ends with + /// a separator, should empty slices be emitted? Defaults to false. public func split ( - separator: Elements.Iterator.Element, allowEmptySlices: Bool = false + separator: Elements.Iterator.Element, allowEmptySlices: Bool = false ) -> LazySplitSequence { return LazySplitSequence(self.elements, separator: separator, allowEmptySlices: allowEmptySlices) } } - +/// A sequence from splitting a series of Collections lazily, as if they were one Collection. public struct PartialSourceLazySplitSequence : IteratorProtocol, LazySequenceProtocol where Base.Iterator.Element: Equatable, Base.SubSequence: RangeReplaceableCollection, @@ -67,12 +80,20 @@ public struct PartialSourceLazySplitSequence : IteratorProtoco private var gs: LazyMapIterator, LazySplitSequence> private var g: LazySplitSequence? + + /// Creates a lazy sequence by splitting a series of collections repeatedly, as if they were one collection. + /// + /// - Parameters: + /// - bases: A function which returns the next collection in the series each time it is called, + /// or nil if there are no more collections. + /// - separator: The element of ‘bases’ to split over. public init (_ bases: @escaping ()->Base?, separator: Base.Iterator.Element) { gs = AnyIterator(bases).lazy.map { LazySplitSequence($0, separator: separator, allowEmptySlices: true).makeIterator() }.makeIterator() } + /// The contents of ‘bases’ up to the next occurrence of ‘separator’. public mutating func next() -> Base.SubSequence? { // Requires g handling repeated calls to next() after it is empty. // When g.remaining becomes nil there is always one item left in g. @@ -82,8 +103,7 @@ public struct PartialSourceLazySplitSequence : IteratorProtoco } if g?.remaining == nil, let next = next() { return head + next - } else { - return head } + return head } } diff --git a/Sources/SwiftShell/Stream/Stream.swift b/Sources/SwiftShell/Stream/Stream.swift new file mode 100644 index 0000000..369a9fe --- /dev/null +++ b/Sources/SwiftShell/Stream/Stream.swift @@ -0,0 +1,212 @@ +// +// Released under the MIT License (MIT), http://opensource.org/licenses/MIT +// +// Copyright (c) 2015 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com) +// + +import Foundation + +extension FileHandle { + + public func readSome(encoding: String.Encoding = .utf8) -> String? { + let data = self.availableData + + guard data.count > 0 else { return nil } + guard let result = String(data: data, encoding: encoding) else { + fatalError("Could not convert binary data to text.") + } + + return result + } + + public func read(encoding: String.Encoding = .utf8) -> String { + let data = self.readDataToEndOfFile() + + guard let result = String(data: data, encoding: encoding) else { + fatalError("Could not convert binary data to text.") + } + + return result + } +} + +extension FileHandle { + + public func write(_ string: String, encoding: String.Encoding = .utf8) { + #if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) + guard !string.isEmpty else {return} + #endif + guard let data = string.data(using: encoding, allowLossyConversion: false) else { + fatalError("Could not convert text to binary data.") + } + self.write(data) + } +} + +#if os(iOS) || os(tvOS) || os(watchOS) +public protocol ShellRunnable {} +#endif + +/// A stream of text. Does as much as possible lazily. +public protocol ReadableStream: class, TextOutputStreamable, ShellRunnable { + + var encoding: String.Encoding {get set} + var filehandle: FileHandle {get} + + /// Whatever amount of text the stream feels like providing. + /// If the source is a file this will read everything at once. + /// - returns: more text from the stream, or nil if we have reached the end. + func readSome() -> String? + + /// Reads everything at once. + func read() -> String +} + +extension ReadableStream { + + public func readSome () -> String? { + return filehandle.readSome(encoding: encoding) + } + + public func read () -> String { + return filehandle.read(encoding: encoding) + } + + /// Splits stream lazily into lines. + public func lines() -> LazySequence> { + return AnySequence(PartialSourceLazySplitSequence({self.readSome()?.characters}, separator: "\n").map { String($0) }).lazy + } + + /// Writes the text in this file to the given TextOutputStream. + public func write(to target: inout Target) { + while let text = self.readSome() { target.write(text) } + } + + #if !(os(iOS) || os(tvOS) || os(watchOS)) + public var shellcontext: ShellContextType { + var context = ShellContext(main) + context.stdin = self + return context + } + #endif +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + extension ReadableStream { + + /** + `handler` will be called whenever there is new output available. + Pass `nil` to remove any preexisting handlers. + - note: if the stream is read from outside of the handler, or more than once inside + the handler, it may be called once when stream is closed and empty. + */ + public func onOutput ( handler: ((ReadableStream) -> ())? ) { + guard let handler = handler else { + filehandle.readabilityHandler = nil + return + } + filehandle.readabilityHandler = { [unowned self] _ in + handler(self) + } + } + + /** + `handler` will be called whenever there is new text output available. + Pass `nil` to remove any preexisting handlers. + */ + public func onStringOutput ( handler: ((String) -> ())? ) { + if let h = handler { + filehandle.readabilityHandler = { (FileHandle) in + if let output = self.readSome() { + h(output) + } + } + } else { + filehandle.readabilityHandler = nil + } + } + } +#endif + + +/// An output stream, like standard output or a writeable file. +public protocol WritableStream: class, TextOutputStream { + + var encoding: String.Encoding {get set} + var filehandle: FileHandle {get} + + /// Writes `x` to the stream. + func write(_ x: String) + + /// Closes the stream. Must be called on non-file streams when finished writing, + /// to prevent deadlock when reading. + func close() +} + +extension WritableStream { + + public func write (_ x: String) { + if filehandle.fileDescriptor == STDOUT_FILENO { + Swift.print(x, terminator: "") + } else { + filehandle.write(x, encoding: encoding) + } + } + + public func close () { + filehandle.closeFile() + } + + /// Writes the textual representations of the given items into the stream. + /// Works exactly the same way as the built-in `print`. + /// + /// To avoid printing a newline at the end, pass `terminator: ""` or use `write` ìnstead. + /// + /// - Parameters: + /// - items: Zero or more items to print, converting them to text with String(describing:). + /// - separator: What to print between each item. Default is " ". + /// - terminator: What to print at the end. Default is newline. + @warn_unqualified_access + public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { + var iterator = items.lazy.map(String.init(describing:)).makeIterator() + iterator.next().map(write) + while let item = iterator.next() { + write(separator) + write(item) + } + write(terminator) + } +} + + +/// Singleton WritableStream used only for `print`ing to stdout. +public class StdoutStream: WritableStream { + public var encoding: String.Encoding = .utf8 + public let filehandle = FileHandle.standardOutput + + private init() {} + + public static var `default`: StdoutStream { return StdoutStream() } + + public func write(_ x: String) { + Swift.print(x, terminator: "") + } + + public func close() {} +} + +public class FileHandleStream: ReadableStream, WritableStream { + public let filehandle: FileHandle + public var encoding: String.Encoding + + public init (_ filehandle: FileHandle, encoding: String.Encoding) { + self.filehandle = filehandle + self.encoding = encoding + } +} + +/// Creates a pair of streams. What is written to the 1st one can be read from the 2nd one. +public func streams () -> (WritableStream, ReadableStream) { + let pipe = Pipe() + return (FileHandleStream(pipe.fileHandleForWriting, encoding: .utf8), FileHandleStream(pipe.fileHandleForReading, encoding: .utf8)) +} diff --git a/Sources/SwiftShell/String.swift b/Sources/SwiftShell/String.swift index 2d9dd89..901206c 100644 --- a/Sources/SwiftShell/String.swift +++ b/Sources/SwiftShell/String.swift @@ -5,6 +5,8 @@ * */ +#if !(os(iOS) || os(tvOS) || os(watchOS)) + import Foundation /** Let Strings run commands using itself as stdin. */ @@ -19,3 +21,5 @@ extension String: ShellRunnable { return context } } + +#endif diff --git a/SwiftShell.xcodeproj/Configs/Project.xcconfig b/SwiftShell.xcodeproj/Configs/Project.xcconfig deleted file mode 100644 index 03d8120..0000000 --- a/SwiftShell.xcodeproj/Configs/Project.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -PRODUCT_NAME = $(TARGET_NAME) -SUPPORTED_PLATFORMS = macosx -MACOSX_DEPLOYMENT_TARGET = 10.11 -DYLIB_INSTALL_NAME_BASE = @rpath -OTHER_SWIFT_FLAGS = -DXcode -COMBINE_HIDPI_IMAGES = YES -USE_HEADERMAP = NO diff --git a/SwiftShell.xcodeproj/GeneralTestSuite_Info.plist b/SwiftShell.xcodeproj/GeneralTests_Info.plist similarity index 100% rename from SwiftShell.xcodeproj/GeneralTestSuite_Info.plist rename to SwiftShell.xcodeproj/GeneralTests_Info.plist diff --git a/SwiftShell.xcodeproj/SwiftShellTestSuite_Info.plist b/SwiftShell.xcodeproj/StreamTests_Info.plist similarity index 100% rename from SwiftShell.xcodeproj/SwiftShellTestSuite_Info.plist rename to SwiftShell.xcodeproj/StreamTests_Info.plist diff --git a/SwiftShell.xcodeproj/SwiftShellTests_Info.plist b/SwiftShell.xcodeproj/SwiftShellTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/SwiftShell.xcodeproj/SwiftShellTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/SwiftShell.xcodeproj/project.pbxproj b/SwiftShell.xcodeproj/project.pbxproj index ba01ade..677ff61 100644 --- a/SwiftShell.xcodeproj/project.pbxproj +++ b/SwiftShell.xcodeproj/project.pbxproj @@ -7,216 +7,214 @@ objects = { /* Begin PBXBuildFile section */ - BA3162631D075F72006BEB3A /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3162621D075F72006BEB3A /* String.swift */; }; - BA3162671D07627D006BEB3A /* String_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3162641D0761D1006BEB3A /* String_Tests.swift */; }; - BAB06F481E3FBF00006D2D02 /* TestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAB06F471E3FBF00006D2D02 /* TestHelpers.swift */; }; - _LinkFileRef_SwiftShell_via_SwiftShellTestSuite /* SwiftShell.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "_____Product_SwiftShell" /* SwiftShell.framework */; }; - __src_cc_ref_Sources/SwiftShell/Bash.swift /* Bash.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/Bash.swift /* Bash.swift */; }; - __src_cc_ref_Sources/SwiftShell/Command.swift /* Command.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/Command.swift /* Command.swift */; }; - __src_cc_ref_Sources/SwiftShell/Context.swift /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/Context.swift /* Context.swift */; }; - __src_cc_ref_Sources/SwiftShell/FileHandle.swift /* FileHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/FileHandle.swift /* FileHandle.swift */; }; - __src_cc_ref_Sources/SwiftShell/Files.swift /* Files.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/Files.swift /* Files.swift */; }; - __src_cc_ref_Sources/SwiftShell/General/Array.swift /* General/Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/General/Array.swift /* General/Array.swift */; }; - "__src_cc_ref_Sources/SwiftShell/General/Lazy-split.swift" /* General/Lazy-split.swift in Sources */ = {isa = PBXBuildFile; fileRef = "__PBXFileRef_Sources/SwiftShell/General/Lazy-split.swift" /* General/Lazy-split.swift */; }; - __src_cc_ref_Sources/SwiftShell/Stream.swift /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/SwiftShell/Stream.swift /* Stream.swift */; }; - __src_cc_ref_Tests/General/Array_Tests.swift /* Array_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/General/Array_Tests.swift /* Array_Tests.swift */; }; - __src_cc_ref_Tests/General/Collection_Tests.swift /* Collection_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/General/Collection_Tests.swift /* Collection_Tests.swift */; }; - __src_cc_ref_Tests/SwiftShell/Command_Tests.swift /* Command_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/SwiftShell/Command_Tests.swift /* Command_Tests.swift */; }; - __src_cc_ref_Tests/SwiftShell/Context_Tests.swift /* Context_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/SwiftShell/Context_Tests.swift /* Context_Tests.swift */; }; - __src_cc_ref_Tests/SwiftShell/FileHandle_Tests.swift /* FileHandle_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/SwiftShell/FileHandle_Tests.swift /* FileHandle_Tests.swift */; }; - __src_cc_ref_Tests/SwiftShell/Files_Tests.swift /* Files_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/SwiftShell/Files_Tests.swift /* Files_Tests.swift */; }; - __src_cc_ref_Tests/SwiftShell/Stream_Tests.swift /* Stream_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Tests/SwiftShell/Stream_Tests.swift /* Stream_Tests.swift */; }; + OBJ_45 /* Bash.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* Bash.swift */; }; + OBJ_46 /* Command.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* Command.swift */; }; + OBJ_47 /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Context.swift */; }; + OBJ_48 /* FileHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* FileHandle.swift */; }; + OBJ_49 /* Files.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Files.swift */; }; + OBJ_50 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* String.swift */; }; + OBJ_51 /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* Array.swift */; }; + OBJ_52 /* Lazy-split.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* Lazy-split.swift */; }; + OBJ_53 /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* Stream.swift */; }; + OBJ_60 /* Array_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_22 /* Array_Tests.swift */; }; + OBJ_67 /* Collection_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_24 /* Collection_Tests.swift */; }; + OBJ_68 /* Stream_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_25 /* Stream_Tests.swift */; }; + OBJ_75 /* Command_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_27 /* Command_Tests.swift */; }; + OBJ_76 /* Context_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_28 /* Context_Tests.swift */; }; + OBJ_77 /* FileHandle_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* FileHandle_Tests.swift */; }; + OBJ_78 /* Files_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_30 /* Files_Tests.swift */; }; + OBJ_79 /* String_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* String_Tests.swift */; }; + OBJ_80 /* TestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_32 /* TestHelpers.swift */; }; + OBJ_82 /* SwiftShell.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* SwiftShell.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - BAA0F1271D04E3800019EF3A /* PBXContainerItemProxy */ = { + BA04CA991E63720F00C51959 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = __RootObject_ /* Project object */; + containerPortal = OBJ_1 /* Project object */; proxyType = 1; - remoteGlobalIDString = "______Target_SwiftShell"; + remoteGlobalIDString = OBJ_40; remoteInfo = SwiftShell; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - BA3162621D075F72006BEB3A /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; - BA3162641D0761D1006BEB3A /* String_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String_Tests.swift; sourceTree = ""; }; - BAB06F471E3FBF00006D2D02 /* TestHelpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestHelpers.swift; sourceTree = ""; }; - __PBXFileRef_GeneralTestSuite_Info.plist /* GeneralTestSuite_Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = GeneralTestSuite_Info.plist; path = SwiftShell.xcodeproj/GeneralTestSuite_Info.plist; sourceTree = SOURCE_ROOT; }; - __PBXFileRef_Package.swift /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - __PBXFileRef_Sources/SwiftShell/Bash.swift /* Bash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Bash.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - __PBXFileRef_Sources/SwiftShell/Command.swift /* Command.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Command.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - __PBXFileRef_Sources/SwiftShell/Context.swift /* Context.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Context.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - __PBXFileRef_Sources/SwiftShell/FileHandle.swift /* FileHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileHandle.swift; sourceTree = ""; }; - __PBXFileRef_Sources/SwiftShell/Files.swift /* Files.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Files.swift; sourceTree = ""; }; - __PBXFileRef_Sources/SwiftShell/General/Array.swift /* General/Array.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = General/Array.swift; sourceTree = ""; }; - "__PBXFileRef_Sources/SwiftShell/General/Lazy-split.swift" /* General/Lazy-split.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "General/Lazy-split.swift"; sourceTree = ""; }; - __PBXFileRef_Sources/SwiftShell/Stream.swift /* Stream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stream.swift; sourceTree = ""; }; - __PBXFileRef_SwiftShell.xcodeproj/Configs/Project.xcconfig /* Project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = SwiftShell.xcodeproj/Configs/Project.xcconfig; sourceTree = ""; }; - __PBXFileRef_SwiftShellTestSuite_Info.plist /* SwiftShellTestSuite_Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = SwiftShellTestSuite_Info.plist; path = SwiftShell.xcodeproj/SwiftShellTestSuite_Info.plist; sourceTree = SOURCE_ROOT; }; - __PBXFileRef_SwiftShell_Info.plist /* SwiftShell_Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = SwiftShell_Info.plist; path = SwiftShell.xcodeproj/SwiftShell_Info.plist; sourceTree = SOURCE_ROOT; }; - __PBXFileRef_Tests/General/Array_Tests.swift /* Array_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Array_Tests.swift; sourceTree = ""; }; - __PBXFileRef_Tests/General/Collection_Tests.swift /* Collection_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection_Tests.swift; sourceTree = ""; }; - __PBXFileRef_Tests/SwiftShell/Command_Tests.swift /* Command_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Command_Tests.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - __PBXFileRef_Tests/SwiftShell/Context_Tests.swift /* Context_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Context_Tests.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - __PBXFileRef_Tests/SwiftShell/FileHandle_Tests.swift /* FileHandle_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = FileHandle_Tests.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - __PBXFileRef_Tests/SwiftShell/Files_Tests.swift /* Files_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Files_Tests.swift; sourceTree = ""; }; - __PBXFileRef_Tests/SwiftShell/Stream_Tests.swift /* Stream_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stream_Tests.swift; sourceTree = ""; }; - "_____Product_GeneralTestSuite" /* GeneralTestSuite.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = GeneralTestSuite.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - "_____Product_SwiftShell" /* SwiftShell.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftShell.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - "_____Product_SwiftShellTestSuite" /* SwiftShellTestSuite.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = SwiftShellTestSuite.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_10 /* Command.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Command.swift; sourceTree = ""; }; + OBJ_11 /* Context.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Context.swift; sourceTree = ""; }; + OBJ_12 /* FileHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileHandle.swift; sourceTree = ""; }; + OBJ_13 /* Files.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Files.swift; sourceTree = ""; }; + OBJ_14 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + OBJ_16 /* Array.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = ""; }; + OBJ_18 /* Lazy-split.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Lazy-split.swift"; sourceTree = ""; }; + OBJ_19 /* Stream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stream.swift; sourceTree = ""; }; + OBJ_22 /* Array_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Array_Tests.swift; sourceTree = ""; }; + OBJ_24 /* Collection_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection_Tests.swift; sourceTree = ""; }; + OBJ_25 /* Stream_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stream_Tests.swift; sourceTree = ""; }; + OBJ_27 /* Command_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Command_Tests.swift; sourceTree = ""; }; + OBJ_28 /* Context_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Context_Tests.swift; sourceTree = ""; }; + OBJ_29 /* FileHandle_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileHandle_Tests.swift; sourceTree = ""; }; + OBJ_30 /* Files_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Files_Tests.swift; sourceTree = ""; }; + OBJ_31 /* String_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String_Tests.swift; sourceTree = ""; }; + OBJ_32 /* TestHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestHelpers.swift; sourceTree = ""; }; + OBJ_33 /* Misc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Misc; sourceTree = SOURCE_ROOT; }; + OBJ_34 /* Scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Scripts; sourceTree = SOURCE_ROOT; }; + OBJ_36 /* SwiftShell.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftShell.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_37 /* GeneralTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = GeneralTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_38 /* StreamTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = StreamTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_39 /* SwiftShellTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = SwiftShellTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + OBJ_9 /* Bash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bash.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - "___LinkPhase_GeneralTestSuite" /* Frameworks */ = { + OBJ_54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 0; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - "___LinkPhase_SwiftShell" /* Frameworks */ = { + OBJ_61 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 0; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - "___LinkPhase_SwiftShellTestSuite" /* Frameworks */ = { + OBJ_69 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 0; files = ( - _LinkFileRef_SwiftShell_via_SwiftShellTestSuite /* SwiftShell.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_81 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + OBJ_82 /* SwiftShell.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - TestProducts_ /* Tests */ = { + OBJ_15 /* General */ = { isa = PBXGroup; children = ( - "_____Product_GeneralTestSuite" /* GeneralTestSuite.xctest */, - "_____Product_SwiftShellTestSuite" /* SwiftShellTestSuite.xctest */, + OBJ_16 /* Array.swift */, ); - name = Tests; + path = General; sourceTree = ""; }; - "___RootGroup_" = { + OBJ_17 /* Stream */ = { isa = PBXGroup; children = ( - __PBXFileRef_Package.swift /* Package.swift */, - "_____Configs_" /* Configs */, - "_____Sources_" /* Sources */, - "_______Tests_" /* Tests */, - "____Products_" /* Products */, + OBJ_18 /* Lazy-split.swift */, + OBJ_19 /* Stream.swift */, ); + path = Stream; sourceTree = ""; }; - "____Products_" /* Products */ = { + OBJ_20 /* Tests */ = { isa = PBXGroup; children = ( - TestProducts_ /* Tests */, - "_____Product_SwiftShell" /* SwiftShell.framework */, + OBJ_21 /* GeneralTests */, + OBJ_23 /* StreamTests */, + OBJ_26 /* SwiftShellTests */, + ); + path = Tests; + sourceTree = ""; + }; + OBJ_21 /* GeneralTests */ = { + isa = PBXGroup; + children = ( + OBJ_22 /* Array_Tests.swift */, + ); + name = GeneralTests; + path = Tests/GeneralTests; + sourceTree = SOURCE_ROOT; + }; + OBJ_23 /* StreamTests */ = { + isa = PBXGroup; + children = ( + OBJ_25 /* Stream_Tests.swift */, + OBJ_24 /* Collection_Tests.swift */, + OBJ_29 /* FileHandle_Tests.swift */, + ); + name = StreamTests; + path = Tests/StreamTests; + sourceTree = SOURCE_ROOT; + }; + OBJ_26 /* SwiftShellTests */ = { + isa = PBXGroup; + children = ( + OBJ_27 /* Command_Tests.swift */, + OBJ_28 /* Context_Tests.swift */, + OBJ_30 /* Files_Tests.swift */, + OBJ_31 /* String_Tests.swift */, + OBJ_32 /* TestHelpers.swift */, + ); + name = SwiftShellTests; + path = Tests/SwiftShellTests; + sourceTree = SOURCE_ROOT; + }; + OBJ_35 /* Products */ = { + isa = PBXGroup; + children = ( + OBJ_36 /* SwiftShell.framework */, + OBJ_37 /* GeneralTests.xctest */, + OBJ_38 /* StreamTests.xctest */, + OBJ_39 /* SwiftShellTests.xctest */, ); name = Products; - sourceTree = ""; + sourceTree = BUILT_PRODUCTS_DIR; }; - "_____Configs_" /* Configs */ = { + OBJ_5 = { isa = PBXGroup; children = ( - __PBXFileRef_SwiftShell.xcodeproj/Configs/Project.xcconfig /* Project.xcconfig */, + OBJ_6 /* Package.swift */, + OBJ_7 /* Sources */, + OBJ_20 /* Tests */, + OBJ_33 /* Misc */, + OBJ_34 /* Scripts */, + OBJ_35 /* Products */, ); - name = Configs; sourceTree = ""; }; - "_____Sources_" /* Sources */ = { + OBJ_7 /* Sources */ = { isa = PBXGroup; children = ( - "_______Group_SwiftShell" /* SwiftShell */, + OBJ_8 /* SwiftShell */, ); - name = Sources; + path = Sources; sourceTree = ""; }; - "_______Group_GeneralTestSuite" /* GeneralTestSuite */ = { + OBJ_8 /* SwiftShell */ = { isa = PBXGroup; children = ( - __PBXFileRef_Tests/General/Array_Tests.swift /* Array_Tests.swift */, - __PBXFileRef_Tests/General/Collection_Tests.swift /* Collection_Tests.swift */, - __PBXFileRef_GeneralTestSuite_Info.plist /* GeneralTestSuite_Info.plist */, - ); - name = GeneralTestSuite; - path = Tests/GeneralTests; - sourceTree = ""; - }; - "_______Group_SwiftShell" /* SwiftShell */ = { - isa = PBXGroup; - children = ( - __PBXFileRef_Sources/SwiftShell/Bash.swift /* Bash.swift */, - __PBXFileRef_Sources/SwiftShell/Command.swift /* Command.swift */, - __PBXFileRef_Sources/SwiftShell/Context.swift /* Context.swift */, - __PBXFileRef_Sources/SwiftShell/FileHandle.swift /* FileHandle.swift */, - __PBXFileRef_Sources/SwiftShell/Files.swift /* Files.swift */, - __PBXFileRef_Sources/SwiftShell/Stream.swift /* Stream.swift */, - BA3162621D075F72006BEB3A /* String.swift */, - __PBXFileRef_Sources/SwiftShell/General/Array.swift /* General/Array.swift */, - "__PBXFileRef_Sources/SwiftShell/General/Lazy-split.swift" /* General/Lazy-split.swift */, - __PBXFileRef_SwiftShell_Info.plist /* SwiftShell_Info.plist */, + OBJ_9 /* Bash.swift */, + OBJ_10 /* Command.swift */, + OBJ_11 /* Context.swift */, + OBJ_12 /* FileHandle.swift */, + OBJ_13 /* Files.swift */, + OBJ_14 /* String.swift */, + OBJ_15 /* General */, + OBJ_17 /* Stream */, ); name = SwiftShell; path = Sources/SwiftShell; - sourceTree = ""; - }; - "_______Group_SwiftShellTestSuite" /* SwiftShellTestSuite */ = { - isa = PBXGroup; - children = ( - BAB06F471E3FBF00006D2D02 /* TestHelpers.swift */, - __PBXFileRef_Tests/SwiftShell/Command_Tests.swift /* Command_Tests.swift */, - __PBXFileRef_Tests/SwiftShell/Context_Tests.swift /* Context_Tests.swift */, - __PBXFileRef_Tests/SwiftShell/FileHandle_Tests.swift /* FileHandle_Tests.swift */, - __PBXFileRef_Tests/SwiftShell/Files_Tests.swift /* Files_Tests.swift */, - __PBXFileRef_Tests/SwiftShell/Stream_Tests.swift /* Stream_Tests.swift */, - BA3162641D0761D1006BEB3A /* String_Tests.swift */, - __PBXFileRef_SwiftShellTestSuite_Info.plist /* SwiftShellTestSuite_Info.plist */, - ); - name = SwiftShellTestSuite; - path = Tests/SwiftShellTests; - sourceTree = ""; - }; - "_______Tests_" /* Tests */ = { - isa = PBXGroup; - children = ( - "_______Group_GeneralTestSuite" /* GeneralTestSuite */, - "_______Group_SwiftShellTestSuite" /* SwiftShellTestSuite */, - ); - name = Tests; - sourceTree = ""; + sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - "______Target_GeneralTestSuite" /* GeneralTestSuite */ = { + OBJ_40 /* SwiftShell */ = { isa = PBXNativeTarget; - buildConfigurationList = "_______Confs_GeneralTestSuite" /* Build configuration list for PBXNativeTarget "GeneralTestSuite" */; + buildConfigurationList = OBJ_41 /* Build configuration list for PBXNativeTarget "SwiftShell" */; buildPhases = ( - CompilePhase_GeneralTestSuite /* Sources */, - "___LinkPhase_GeneralTestSuite" /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GeneralTestSuite; - productName = GeneralTestSuite; - productReference = "_____Product_GeneralTestSuite" /* GeneralTestSuite.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - "______Target_SwiftShell" /* SwiftShell */ = { - isa = PBXNativeTarget; - buildConfigurationList = "_______Confs_SwiftShell" /* Build configuration list for PBXNativeTarget "SwiftShell" */; - buildPhases = ( - CompilePhase_SwiftShell /* Sources */, - "___LinkPhase_SwiftShell" /* Frameworks */, + OBJ_44 /* Sources */, + OBJ_54 /* Frameworks */, ); buildRules = ( ); @@ -224,272 +222,579 @@ ); name = SwiftShell; productName = SwiftShell; - productReference = "_____Product_SwiftShell" /* SwiftShell.framework */; + productReference = OBJ_36 /* SwiftShell.framework */; productType = "com.apple.product-type.framework"; }; - "______Target_SwiftShellTestSuite" /* SwiftShellTestSuite */ = { + OBJ_55 /* GeneralTests */ = { isa = PBXNativeTarget; - buildConfigurationList = "_______Confs_SwiftShellTestSuite" /* Build configuration list for PBXNativeTarget "SwiftShellTestSuite" */; + buildConfigurationList = OBJ_56 /* Build configuration list for PBXNativeTarget "GeneralTests" */; buildPhases = ( - CompilePhase_SwiftShellTestSuite /* Sources */, - "___LinkPhase_SwiftShellTestSuite" /* Frameworks */, + OBJ_59 /* Sources */, + OBJ_61 /* Frameworks */, ); buildRules = ( ); dependencies = ( - __Dependency_SwiftShell /* PBXTargetDependency */, ); - name = SwiftShellTestSuite; - productName = SwiftShellTestSuite; - productReference = "_____Product_SwiftShellTestSuite" /* SwiftShellTestSuite.xctest */; + name = GeneralTests; + productName = GeneralTests; + productReference = OBJ_37 /* GeneralTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + OBJ_62 /* StreamTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_63 /* Build configuration list for PBXNativeTarget "StreamTests" */; + buildPhases = ( + OBJ_66 /* Sources */, + OBJ_69 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StreamTests; + productName = StreamTests; + productReference = OBJ_38 /* StreamTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + OBJ_70 /* SwiftShellTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_71 /* Build configuration list for PBXNativeTarget "SwiftShellTests" */; + buildPhases = ( + OBJ_74 /* Sources */, + OBJ_81 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + OBJ_83 /* PBXTargetDependency */, + ); + name = SwiftShellTests; + productName = SwiftShellTests; + productReference = OBJ_39 /* SwiftShellTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - __RootObject_ /* Project object */ = { + OBJ_1 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0820; + LastUpgradeCheck = 9999; }; - buildConfigurationList = "___RootConfs_" /* Build configuration list for PBXProject "SwiftShell" */; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "SwiftShell" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = "___RootGroup_"; - productRefGroup = "____Products_" /* Products */; + mainGroup = OBJ_5; + productRefGroup = OBJ_35 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - "______Target_SwiftShell" /* SwiftShell */, - "______Target_GeneralTestSuite" /* GeneralTestSuite */, - "______Target_SwiftShellTestSuite" /* SwiftShellTestSuite */, + OBJ_40 /* SwiftShell */, + OBJ_55 /* GeneralTests */, + OBJ_62 /* StreamTests */, + OBJ_70 /* SwiftShellTests */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - CompilePhase_GeneralTestSuite /* Sources */ = { + OBJ_44 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 0; files = ( - __src_cc_ref_Tests/General/Array_Tests.swift /* Array_Tests.swift in Sources */, - __src_cc_ref_Tests/General/Collection_Tests.swift /* Collection_Tests.swift in Sources */, + OBJ_45 /* Bash.swift in Sources */, + OBJ_46 /* Command.swift in Sources */, + OBJ_47 /* Context.swift in Sources */, + OBJ_48 /* FileHandle.swift in Sources */, + OBJ_49 /* Files.swift in Sources */, + OBJ_50 /* String.swift in Sources */, + OBJ_51 /* Array.swift in Sources */, + OBJ_52 /* Lazy-split.swift in Sources */, + OBJ_53 /* Stream.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - CompilePhase_SwiftShell /* Sources */ = { + OBJ_59 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 0; files = ( - __src_cc_ref_Sources/SwiftShell/Bash.swift /* Bash.swift in Sources */, - __src_cc_ref_Sources/SwiftShell/Command.swift /* Command.swift in Sources */, - __src_cc_ref_Sources/SwiftShell/Context.swift /* Context.swift in Sources */, - BA3162631D075F72006BEB3A /* String.swift in Sources */, - __src_cc_ref_Sources/SwiftShell/FileHandle.swift /* FileHandle.swift in Sources */, - __src_cc_ref_Sources/SwiftShell/Files.swift /* Files.swift in Sources */, - __src_cc_ref_Sources/SwiftShell/Stream.swift /* Stream.swift in Sources */, - __src_cc_ref_Sources/SwiftShell/General/Array.swift /* General/Array.swift in Sources */, - "__src_cc_ref_Sources/SwiftShell/General/Lazy-split.swift" /* General/Lazy-split.swift in Sources */, + OBJ_60 /* Array_Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - CompilePhase_SwiftShellTestSuite /* Sources */ = { + OBJ_66 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 0; files = ( - __src_cc_ref_Tests/SwiftShell/Command_Tests.swift /* Command_Tests.swift in Sources */, - __src_cc_ref_Tests/SwiftShell/Context_Tests.swift /* Context_Tests.swift in Sources */, - BAB06F481E3FBF00006D2D02 /* TestHelpers.swift in Sources */, - BA3162671D07627D006BEB3A /* String_Tests.swift in Sources */, - __src_cc_ref_Tests/SwiftShell/FileHandle_Tests.swift /* FileHandle_Tests.swift in Sources */, - __src_cc_ref_Tests/SwiftShell/Files_Tests.swift /* Files_Tests.swift in Sources */, - __src_cc_ref_Tests/SwiftShell/Stream_Tests.swift /* Stream_Tests.swift in Sources */, + OBJ_67 /* Collection_Tests.swift in Sources */, + OBJ_68 /* Stream_Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_74 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_75 /* Command_Tests.swift in Sources */, + OBJ_76 /* Context_Tests.swift in Sources */, + OBJ_77 /* FileHandle_Tests.swift in Sources */, + OBJ_78 /* Files_Tests.swift in Sources */, + OBJ_79 /* String_Tests.swift in Sources */, + OBJ_80 /* TestHelpers.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - __Dependency_SwiftShell /* PBXTargetDependency */ = { + OBJ_83 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = "______Target_SwiftShell" /* SwiftShell */; - targetProxy = BAA0F1271D04E3800019EF3A /* PBXContainerItemProxy */; + target = OBJ_40 /* SwiftShell */; + targetProxy = BA04CA991E63720F00C51959 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - _ReleaseConf_GeneralTestSuite /* Release */ = { + BAC5F15E1E64F15900F075BA /* Debug-iOS */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = SwiftShell.xcodeproj/GeneralTestSuite_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - }; - name = Release; - }; - _ReleaseConf_SwiftShell /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShell_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - }; - name = Release; - }; - _ReleaseConf_SwiftShellTestSuite /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShellTestSuite_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - }; - name = Release; - }; - "___DebugConf_GeneralTestSuite" /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = SwiftShell.xcodeproj/GeneralTestSuite_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - "___DebugConf_SwiftShell" /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShell_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - "___DebugConf_SwiftShellTestSuite" /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShellTestSuite_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - "_____Release_" /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = __PBXFileRef_SwiftShell.xcodeproj/Configs/Project.xcconfig /* Project.xcconfig */; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - "_______Debug_" /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = __PBXFileRef_SwiftShell.xcodeproj/Configs/Project.xcconfig /* Project.xcconfig */; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; + USE_HEADERMAP = NO; + }; + name = "Debug-iOS"; + }; + BAC5F15F1E64F15900F075BA /* Debug-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShell_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = SwiftShell; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + TARGET_NAME = SwiftShell; + }; + name = "Debug-iOS"; + }; + BAC5F1601E64F15900F075BA /* Debug-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/GeneralTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = GeneralTests; + }; + name = "Debug-iOS"; + }; + BAC5F1611E64F15900F075BA /* Debug-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/StreamTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + TARGET_NAME = StreamTests; + }; + name = "Debug-iOS"; + }; + BAC5F1621E64F15900F075BA /* Debug-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShellTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = SwiftShellTests; + }; + name = "Debug-iOS"; + }; + BAC5F1631E64F2BD00F075BA /* Release-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = s; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 3.0; + USE_HEADERMAP = NO; + }; + name = "Release-iOS"; + }; + BAC5F1641E64F2BD00F075BA /* Release-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShell_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = SwiftShell; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + TARGET_NAME = SwiftShell; + }; + name = "Release-iOS"; + }; + BAC5F1651E64F2BD00F075BA /* Release-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/GeneralTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = GeneralTests; + }; + name = "Release-iOS"; + }; + BAC5F1661E64F2BD00F075BA /* Release-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/StreamTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + TARGET_NAME = StreamTests; + }; + name = "Release-iOS"; + }; + BAC5F1671E64F2BD00F075BA /* Release-iOS */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShellTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = SwiftShellTests; + }; + name = "Release-iOS"; + }; + OBJ_3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + USE_HEADERMAP = NO; }; name = Debug; }; + OBJ_4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = s; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 3.0; + USE_HEADERMAP = NO; + }; + name = Release; + }; + OBJ_42 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShell_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = SwiftShell; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SUPPORTED_PLATFORMS = macosx; + TARGET_NAME = SwiftShell; + }; + name = Debug; + }; + OBJ_43 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShell_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = SwiftShell; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SUPPORTED_PLATFORMS = macosx; + TARGET_NAME = SwiftShell; + }; + name = Release; + }; + OBJ_57 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/GeneralTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = GeneralTests; + }; + name = Debug; + }; + OBJ_58 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/GeneralTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = GeneralTests; + }; + name = Release; + }; + OBJ_64 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/StreamTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SUPPORTED_PLATFORMS = macosx; + TARGET_NAME = StreamTests; + }; + name = Debug; + }; + OBJ_65 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/StreamTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SUPPORTED_PLATFORMS = macosx; + TARGET_NAME = StreamTests; + }; + name = Release; + }; + OBJ_72 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShellTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = SwiftShellTests; + }; + name = Debug; + }; + OBJ_73 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = SwiftShell.xcodeproj/SwiftShellTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = SwiftShellTests; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - "___RootConfs_" /* Build configuration list for PBXProject "SwiftShell" */ = { + OBJ_2 /* Build configuration list for PBXProject "SwiftShell" */ = { isa = XCConfigurationList; buildConfigurations = ( - "_______Debug_" /* Debug */, - "_____Release_" /* Release */, + OBJ_3 /* Debug */, + BAC5F15E1E64F15900F075BA /* Debug-iOS */, + OBJ_4 /* Release */, + BAC5F1631E64F2BD00F075BA /* Release-iOS */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - "_______Confs_GeneralTestSuite" /* Build configuration list for PBXNativeTarget "GeneralTestSuite" */ = { + OBJ_41 /* Build configuration list for PBXNativeTarget "SwiftShell" */ = { isa = XCConfigurationList; buildConfigurations = ( - "___DebugConf_GeneralTestSuite" /* Debug */, - _ReleaseConf_GeneralTestSuite /* Release */, + OBJ_42 /* Debug */, + BAC5F15F1E64F15900F075BA /* Debug-iOS */, + OBJ_43 /* Release */, + BAC5F1641E64F2BD00F075BA /* Release-iOS */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - "_______Confs_SwiftShell" /* Build configuration list for PBXNativeTarget "SwiftShell" */ = { + OBJ_56 /* Build configuration list for PBXNativeTarget "GeneralTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - "___DebugConf_SwiftShell" /* Debug */, - _ReleaseConf_SwiftShell /* Release */, + OBJ_57 /* Debug */, + BAC5F1601E64F15900F075BA /* Debug-iOS */, + OBJ_58 /* Release */, + BAC5F1651E64F2BD00F075BA /* Release-iOS */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - "_______Confs_SwiftShellTestSuite" /* Build configuration list for PBXNativeTarget "SwiftShellTestSuite" */ = { + OBJ_63 /* Build configuration list for PBXNativeTarget "StreamTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - "___DebugConf_SwiftShellTestSuite" /* Debug */, - _ReleaseConf_SwiftShellTestSuite /* Release */, + OBJ_64 /* Debug */, + BAC5F1611E64F15900F075BA /* Debug-iOS */, + OBJ_65 /* Release */, + BAC5F1661E64F2BD00F075BA /* Release-iOS */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + OBJ_71 /* Build configuration list for PBXNativeTarget "SwiftShellTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_72 /* Debug */, + BAC5F1621E64F15900F075BA /* Debug-iOS */, + OBJ_73 /* Release */, + BAC5F1671E64F2BD00F075BA /* Release-iOS */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = __RootObject_ /* Project object */; + rootObject = OBJ_1 /* Project object */; } diff --git a/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme b/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme new file mode 100644 index 0000000..b1f9307 --- /dev/null +++ b/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell.xcscheme b/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell.xcscheme index 41d00c8..78adfb9 100644 --- a/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell.xcscheme +++ b/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell.xcscheme @@ -14,7 +14,7 @@ buildForAnalyzing = "YES"> @@ -28,9 +28,23 @@ buildForAnalyzing = "NO"> + + + + @@ -46,9 +60,9 @@ skipped = "NO"> @@ -56,9 +70,19 @@ skipped = "NO"> + + + + @@ -66,7 +90,7 @@ @@ -88,7 +112,7 @@ @@ -106,7 +130,7 @@ diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index a4197c0..9c64c82 100755 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -3,6 +3,7 @@ import XCTest import GeneralTests import SwiftShellTests +import StreamTests let tests: [XCTestCaseEntry] = [ testCase(Array_Tests.allTests), diff --git a/Tests/GeneralTests/Collection_Tests.swift b/Tests/StreamTests/Collection_Tests.swift similarity index 100% rename from Tests/GeneralTests/Collection_Tests.swift rename to Tests/StreamTests/Collection_Tests.swift diff --git a/Tests/SwiftShellTests/FileHandle_Tests.swift b/Tests/StreamTests/FileHandle_Tests.swift similarity index 100% rename from Tests/SwiftShellTests/FileHandle_Tests.swift rename to Tests/StreamTests/FileHandle_Tests.swift diff --git a/Tests/SwiftShellTests/Stream_Tests.swift b/Tests/StreamTests/Stream_Tests.swift similarity index 94% rename from Tests/SwiftShellTests/Stream_Tests.swift rename to Tests/StreamTests/Stream_Tests.swift index 01c69ed..0c03968 100755 --- a/Tests/SwiftShellTests/Stream_Tests.swift +++ b/Tests/StreamTests/Stream_Tests.swift @@ -6,7 +6,7 @@ // Copyright (c) 2014 NotTooBad Software. All rights reserved. // -@testable import SwiftShell +import SwiftShell import XCTest public class Stream_Tests: XCTestCase { @@ -26,6 +26,7 @@ public class Stream_Tests: XCTestCase { XCTAssertEqual(reader.read(), "three") } +#if !(os(iOS) || os(tvOS) || os(watchOS)) func testReadableStreamRun () { let (writer,reader) = streams() @@ -43,6 +44,7 @@ public class Stream_Tests: XCTestCase { XCTAssertEqual(reader.runAsync("cat").stdout.read(), "one") } +#endif func testPrintStream () { let (writer,reader) = streams() @@ -89,7 +91,7 @@ public class Stream_Tests: XCTestCase { XCTAssertEqual(reader.readSome(), text) } -#if os(macOS) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) func testOnOutput () { let (writer,reader) = streams() @@ -117,6 +119,7 @@ public class Stream_Tests: XCTestCase { #endif } +#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) extension Stream_Tests { public static var allTests = [ ("testStreams", testStreams), @@ -129,3 +132,4 @@ extension Stream_Tests { //("testOnStringOutput", testOnStringOutput), ] } +#endif diff --git a/Tests/SwiftShellTests/Command_Tests.swift b/Tests/SwiftShellTests/Command_Tests.swift index a84418f..22ada5f 100755 --- a/Tests/SwiftShellTests/Command_Tests.swift +++ b/Tests/SwiftShellTests/Command_Tests.swift @@ -9,6 +9,7 @@ @testable import SwiftShell + import XCTest import Foundation @@ -91,11 +92,11 @@ public class RunAndPrint_Tests: XCTestCase { public override func setUp () { let outputpipe = Pipe() - main.stdout = FileHandleStream(outputpipe.fileHandleForWriting) + main.stdout = FileHandleStream(outputpipe.fileHandleForWriting, encoding: .utf8) test_stdout = outputpipe.fileHandleForReading let errorpipe = Pipe() - main.stderror = FileHandleStream(errorpipe.fileHandleForWriting) + main.stderror = FileHandleStream(errorpipe.fileHandleForWriting, encoding: .utf8) test_stderr = errorpipe.fileHandleForReading } diff --git a/Tests/SwiftShellTests/Context_Tests.swift b/Tests/SwiftShellTests/Context_Tests.swift index bc919b4..dc3cf49 100755 --- a/Tests/SwiftShellTests/Context_Tests.swift +++ b/Tests/SwiftShellTests/Context_Tests.swift @@ -8,6 +8,7 @@ import XCTest @testable import SwiftShell + import Foundation public class MainContext_Tests: XCTestCase { @@ -91,7 +92,7 @@ public class BlankShellContext_Tests: XCTestCase { try context.runAndPrint("/bin/echo", "one") // sent to null let outputpipe = Pipe() - context.stdout = FileHandleStream(outputpipe.fileHandleForWriting) + context.stdout = FileHandleStream(outputpipe.fileHandleForWriting, encoding: .utf8) let output = outputpipe.fileHandleForReading try context.runAndPrint("/bin/echo", "two")