Test that opener is using the right arguments when we pass wait: true

This commit is contained in:
Pedro Piñera 2019-11-25 17:36:49 +01:00
parent 2ddcb969fe
commit 87f964b8eb
1 changed files with 9 additions and 1 deletions

View File

@ -41,7 +41,15 @@ final class OpenerTests: TuistUnitTestCase {
let temporaryPath = try self.temporaryPath()
let path = temporaryPath.appending(component: "tool")
try FileHandler.shared.touch(path)
system.succeedCommand("/usr/bin/open", path.pathString)
system.succeedCommand("/usr/bin/open", "-W", path.pathString)
try subject.open(path: path)
}
func test_open_when_wait_is_false() throws {
let temporaryPath = try self.temporaryPath()
let path = temporaryPath.appending(component: "tool")
try FileHandler.shared.touch(path)
system.succeedCommand("/usr/bin/open", path.pathString)
try subject.open(path: path, wait: false)
}
}