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") |
| 6 |
5 import 'dart:io'; | 7 import 'dart:io'; |
6 | 8 |
7 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
8 import 'package:unittest/src/util/exit_codes.dart' as exit_codes; | 10 import 'package:unittest/src/util/exit_codes.dart' as exit_codes; |
9 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
10 | 12 |
11 import '../../io.dart'; | 13 import '../../io.dart'; |
12 | 14 |
13 String _sandbox; | 15 String _sandbox; |
14 | 16 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 new File(testPath).writeAsStringSync("String main() => 12;\n"); | 52 new File(testPath).writeAsStringSync("String main() => 12;\n"); |
51 | 53 |
52 var result = _runUnittest(["--color", "-p", "chrome", "test.dart"]); | 54 var result = _runUnittest(["--color", "-p", "chrome", "test.dart"]); |
53 expect(result.stdout, contains('\u001b[35m')); | 55 expect(result.stdout, contains('\u001b[35m')); |
54 expect(result.exitCode, equals(exit_codes.data)); | 56 expect(result.exitCode, equals(exit_codes.data)); |
55 }); | 57 }); |
56 } | 58 } |
57 | 59 |
58 ProcessResult _runUnittest(List<String> args) => | 60 ProcessResult _runUnittest(List<String> args) => |
59 runUnittest(args, workingDirectory: _sandbox); | 61 runUnittest(args, workingDirectory: _sandbox); |
OLD | NEW |