| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 @TestOn("vm") | 5 @TestOn("vm") |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
| 9 | 9 |
| 10 import 'package:scheduled_test/descriptor.dart' as d; | 10 import 'package:scheduled_test/descriptor.dart' as d; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 """; | 35 """; |
| 36 | 36 |
| 37 final _defaultConcurrency = math.max(1, Platform.numberOfProcessors ~/ 2); | 37 final _defaultConcurrency = math.max(1, Platform.numberOfProcessors ~/ 2); |
| 38 | 38 |
| 39 final _browsers = | 39 final _browsers = |
| 40 "[vm (default), dartium, content-shell, chrome, phantomjs, firefox" + | 40 "[vm (default), dartium, content-shell, chrome, phantomjs, firefox" + |
| 41 (Platform.isMacOS ? ", safari" : "") + | 41 (Platform.isMacOS ? ", safari" : "") + |
| 42 (Platform.isWindows ? ", ie" : "") + "]"; | 42 (Platform.isWindows ? ", ie" : "") + "]"; |
| 43 | 43 |
| 44 final _usage = """ | 44 final _usage = """ |
| 45 Usage: pub run test:test [files or directories...] | 45 Usage: pub run test [files or directories...] |
| 46 | 46 |
| 47 -h, --help Shows this usage information. | 47 -h, --help Shows this usage information. |
| 48 --version Shows the package's version. | 48 --version Shows the package's version. |
| 49 | 49 |
| 50 ======== Selecting Tests | 50 ======== Selecting Tests |
| 51 -n, --name A substring of the name of the test to run. | 51 -n, --name A substring of the name of the test to run. |
| 52 Regular expression syntax is supported. | 52 Regular expression syntax is supported. |
| 53 If passed multiple times, tests must match all su
bstrings. | 53 If passed multiple times, tests must match all su
bstrings. |
| 54 | 54 |
| 55 -N, --plain-name A plain-text substring of the name of the test to
run. | 55 -N, --plain-name A plain-text substring of the name of the test to
run. |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 }); | 564 }); |
| 565 | 565 |
| 566 test("with the --color flag, uses colors", () { | 566 test("with the --color flag, uses colors", () { |
| 567 d.file("test.dart", _failure).create(); | 567 d.file("test.dart", _failure).create(); |
| 568 var test = runTest(["--color", "test.dart"]); | 568 var test = runTest(["--color", "test.dart"]); |
| 569 // This is the color code for red. | 569 // This is the color code for red. |
| 570 test.stdout.expect(consumeThrough(contains("\u001b[31m"))); | 570 test.stdout.expect(consumeThrough(contains("\u001b[31m"))); |
| 571 test.shouldExit(); | 571 test.shouldExit(); |
| 572 }); | 572 }); |
| 573 } | 573 } |
| OLD | NEW |