Peter Hosey committed d7a4929

Changed the test program to use (and demonstrate) taskWithProgramName:arguments:.

  • Participants
  • Parent commits a24bd35

Comments (0)

Files changed (1)

File PRHTaskTest/PRHTaskTest/main.m

 int main (int argc, char **argv) {
 	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-	PRHTask *task = [[[PRHTask alloc] init] autorelease];
-	task.launchPath = @"/bin/echo";
-	task.arguments = [NSArray arrayWithObject:@"I am the very model of a modern Major-General"];
+	PRHTask *task = [PRHTask taskWithProgramName:@"echo" arguments:@"I am the very model of a modern Major-General", nil];
 	task.accumulatesStandardOutput = YES;
 	task.successfulTerminationBlock = ^(PRHTask *completedTask) {