Files
SwiftShell/SwiftShellTests/Command_Tests.swift
T
Kare Morstol da3a0f5361 Add $(bash:) . Refactor command.swift.
Had to add leading spaces (shudder) to the documentation comment to get Xcode to render it properly. Hopefully this is just a temporary fix.
2015-08-06 03:49:57 +02:00

27 lines
511 B
Swift

//
// Command_Tests.swift
// SwiftShell
//
// Created by Kåre Morstøl on 15/08/14.
// Copyright (c) 2014 NotTooBad Software. All rights reserved.
//
import SwiftShell
import XCTest
class Command_Tests: XCTestCase {
func test$BashCommand () {
XCTAssertEqual( main.$(bash:"echo one"), "one" )
}
func testSingleline$Command () {
XCTAssertEqual( main.$("/bin/echo", "one", "two"), "one two" )
}
func testMultiline$Command () {
XCTAssertEqual( main.$("/bin/echo", "one\ntwo"), "one\ntwo\n" )
}
}