Chromium Code Reviews

Side by Side Diff: test/runner/pub_serve_test.dart

Issue 1649663003: Add basic support for a configuration file. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 13 matching lines...)
24 d.file("pubspec.yaml", """ 24 d.file("pubspec.yaml", """
25 name: myapp 25 name: myapp
26 dependencies: 26 dependencies:
27 barback: any 27 barback: any
28 test: {path: ${p.current}} 28 test: {path: ${p.current}}
29 transformers: 29 transformers:
30 - myapp: 30 - myapp:
31 \$include: test/**_test.dart 31 \$include: test/**_test.dart
32 - test/pub_serve: 32 - test/pub_serve:
33 \$include: test/**_test.dart 33 \$include: test/**_test.dart
34 dependency_overrides:
35 matcher: '0.12.0-alpha.0'
36 """).create(); 34 """).create();
37 35
38 d.dir("test", [ 36 d.dir("test", [
39 d.file("my_test.dart", """ 37 d.file("my_test.dart", """
40 import 'package:test/test.dart'; 38 import 'package:test/test.dart';
41 39
42 void main() { 40 void main() {
43 test("test", () => expect(true, isTrue)); 41 test("test", () => expect(true, isTrue));
44 } 42 }
45 """) 43 """)
(...skipping 260 matching lines...)
306 304
307 var test = runTest(['--pub-serve=54321', 'my_test.dart']); 305 var test = runTest(['--pub-serve=54321', 'my_test.dart']);
308 test.stdout.expect(containsInOrder([ 306 test.stdout.expect(containsInOrder([
309 '-1: loading my_test.dart', 307 '-1: loading my_test.dart',
310 'Failed to load "my_test.dart": When using "pub serve", all test files ' 308 'Failed to load "my_test.dart": When using "pub serve", all test files '
311 'must be in test/.' 309 'must be in test/.'
312 ])); 310 ]));
313 test.shouldExit(1); 311 test.shouldExit(1);
314 }); 312 });
315 } 313 }
OLDNEW

Powered by Google App Engine