OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
6 | 6 |
7 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
9 import '../serve/utils.dart'; | 9 import '../serve/utils.dart'; |
10 | 10 |
11 main() { | 11 main() { |
12 initConfig(); | |
13 | |
14 setUp(() { | 12 setUp(() { |
15 d.dir(appPath, [ | 13 d.dir(appPath, [ |
16 d.appPubspec(), | 14 d.appPubspec(), |
17 d.dir('bar', [d.file('file.txt', 'bar')]), | 15 d.dir('bar', [d.file('file.txt', 'bar')]), |
18 d.dir('foo', [d.file('file.txt', 'foo')]), | 16 d.dir('foo', [d.file('file.txt', 'foo')]), |
19 d.dir('test', [d.file('file.txt', 'test')]), | 17 d.dir('test', [d.file('file.txt', 'test')]), |
20 d.dir('web', [d.file('file.txt', 'web')]) | 18 d.dir('web', [d.file('file.txt', 'web')]) |
21 ]).create(); | 19 ]).create(); |
22 }); | 20 }); |
23 | 21 |
(...skipping 19 matching lines...) Expand all Loading... |
43 pubServe(args: ["foo", "bar"]); | 41 pubServe(args: ["foo", "bar"]); |
44 | 42 |
45 requestShouldSucceed("file.txt", "bar", root: "bar"); | 43 requestShouldSucceed("file.txt", "bar", root: "bar"); |
46 requestShouldSucceed("file.txt", "foo", root: "foo"); | 44 requestShouldSucceed("file.txt", "foo", root: "foo"); |
47 expectNotServed("test"); | 45 expectNotServed("test"); |
48 expectNotServed("web"); | 46 expectNotServed("web"); |
49 | 47 |
50 endPubServe(); | 48 endPubServe(); |
51 }); | 49 }); |
52 } | 50 } |
OLD | NEW |