// Copyright (c) 2013, 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.

import "dart:convert";
import "dart:io";

import "package:expect/expect.dart";

void main() {
  var script = Platform.script.resolve("console_script.dart").toFilePath();
  Process.run(Platform.executable,
              ['--checked', script],
              stdoutEncoding: ASCII,
              stderrEncoding: ASCII).then((result) {
                  print(result.stdout);
                  print(result.stderr);
    Expect.equals(1, result.exitCode);
    Expect.equals('stdout\ntuodts\nABCDEFGHIJKLM\n', result.stdout);
    Expect.equals('stderr\nrredts\nABCDEFGHIJKLM\n', result.stderr);
  });
}

// Copyright (c) 2013, 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.

import "dart:convert";
import "dart:io";

import "package:expect/expect.dart";

void main() {
  var script = Platform.script.resolve("console_script.dart").toFilePath();
  Process.run(Platform.executable,
              ['--checked', script],
              stdoutEncoding: ASCII,
              stderrEncoding: ASCII).then((result) {
                  print(result.stdout);
                  print(result.stderr);
    Expect.equals(1, result.exitCode);
    if (Platform.isWindows) {
      Expect.equals('stdout\r\ntuodts\r\nABCDEFGHIJKLM\r\n', result.stdout);
      Expect.equals('stderr\r\nrredts\r\nABCDEFGHIJKLM\r\n', result.stderr);
    } else {
      Expect.equals('stdout\ntuodts\nABCDEFGHIJKLM\n', result.stdout);
      Expect.equals('stderr\nrredts\nABCDEFGHIJKLM\n', result.stderr);
    }
  });
}

Fix console test for Windows
Fix console test for Windows

TBR=iposva@google.com
BUG=

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

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