Files
SwiftShell/SwiftShellTests/Context_Tests.swift
T
Kare Morstol 239d32edfd Rename ‘$’ to ‘run’.
Trying to not repeat the mistakes of bash shell scripting here.
2015-09-02 17:34:40 +02:00

26 lines
597 B
Swift

//
// Context_Tests.swift
// SwiftShell2
//
// Created by Kåre Morstøl on 20.07.15.
//
//
import XCTest
import SwiftShell
class Context_Tests: XCTestCase {
func testCurrentDirectory_IsCurrentDirectory () {
XCTAssertEqual( main.currentdirectory, NSFileManager.defaultManager().currentDirectoryPath )
}
func testCurrentDirectory_CanChange () {
main.currentdirectory = "/tmp"
XCTAssertEqual( main.currentdirectory, "/private/tmp" )
XCTAssertEqual( main.run("/bin/pwd"), "/tmp" )
XCTAssertEqual( main.currentdirectory, NSFileManager.defaultManager().currentDirectoryPath )
}
}