Files
sdk/tests/standalone/io/process_path_test.dart
T
ajohnsen@google.com 87ea640826 Remove ProcessOptions and make the options named arguments.
This also removed Process.runShell and adds a new flag: runInShell.

BUG=
R=kustermann@google.com, nweiz@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//15883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23131 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 11:03:40 +00:00

25 lines
725 B
Dart

// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// Test that the executable is looked up on the user's PATH when spawning a
// process.
import "package:expect/expect.dart";
import "dart:io";
main() {
// Pick an app that we expect to be on the PATH that returns 0 when run with
// no arguments.
var executable = 'true';
var args = [];
if (Platform.operatingSystem == 'windows') {
executable = 'cmd.exe';
args = ['/C', 'echo', '"ok"'];
}
Process.run(executable, args).then((result) {
Expect.equals(0, result.exitCode);
});
}