// 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.
//
// Process test program to test process communication.

#import("dart:io");

class ProcessStartExceptionTest {

  static void testStartError() {
    Process process =
        new Process.start("__path_to_something_that_should_not_exist__",
                          const []);

    process.onExit = (int exitCode) {
      Expect.fail("exit handler called");
    };

    process.onError = (ProcessException e) {
      Expect.equals(2, e.errorCode);
    };
  }
}

main() {
  ProcessStartExceptionTest.testStartError();
}

// 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.
//
// Process test program to test process communication.

#import("dart:io");

class ProcessStartExceptionTest {

  static void testStartError() {
    Process process =
        new Process.start("__path_to_something_that_should_not_exist__",
                          const []);

    process.onExit = (int exitCode) {
      Expect.fail("exit handler called");
    };

    process.onError = (ProcessException e) {
      Expect.equals(2, e.errorCode, e.toString());
    };
  }
}

main() {
  ProcessStartExceptionTest.testStartError();
}

Print the actual error message on failure in the ProcessStartException test.
Print the actual error message on failure in the ProcessStartException test.

R=iposva@google.com,sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9856020

git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@5842 260f80e4-7a28-3924-810f-c04153c831b5
