Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1027)

Side by Side Diff: sdk/lib/_internal/pub_generated/test/barback/subdirectories_test.dart

Issue 887223007: Revert "Use native async/await support in pub." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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:path/path.dart' as p; 5 import 'package:path/path.dart' as p;
6 import 'package:scheduled_test/scheduled_test.dart'; 6 import 'package:scheduled_test/scheduled_test.dart';
7 7
8 import '../descriptor.dart' as d; 8 import '../descriptor.dart' as d;
9 import '../serve/utils.dart'; 9 import '../serve/utils.dart';
10 import '../test_pub.dart'; 10 import '../test_pub.dart';
11 11
12 main() { 12 main() {
13 initConfig(); 13 initConfig();
14 14
15 setUp(() { 15 setUp(() {
16 d.dir(appPath, [ 16 d.dir(
17 d.appPubspec(), 17 appPath,
18 d.dir("web", [ 18 [
19 d.dir("one", [ 19 d.appPubspec(),
20 d.dir("inner", [d.file("file.txt", "one")]) 20 d.dir(
21 ]), 21 "web",
22 d.dir("two", [ 22 [
23 d.dir("inner", [d.file("file.txt", "two")]) 23 d.dir("one", [d.dir("inner", [d.file("file.txt", "one")])]),
24 ]), 24 d.dir("two", [d.dir("inner", [d.file("file.txt", "two")])]),
25 d.dir("nope", [ 25 d.dir("nope", [d.dir("inner", [d.file("file.txt", "nope")])] )])]).create();
26 d.dir("inner", [d.file("file.txt", "nope")])
27 ])
28 ])
29 ]).create();
30 }); 26 });
31 27
32 var webOne = p.join("web", "one"); 28 var webOne = p.join("web", "one");
33 var webTwoInner = p.join("web", "two", "inner"); 29 var webTwoInner = p.join("web", "two", "inner");
34 30
35 integration("builds subdirectories", () { 31 integration("builds subdirectories", () {
36 schedulePub(args: ["build", webOne, webTwoInner], 32 schedulePub(
33 args: ["build", webOne, webTwoInner],
37 output: new RegExp(r'Built 2 files to "build".')); 34 output: new RegExp(r'Built 2 files to "build".'));
38 35
39 d.dir(appPath, [ 36 d.dir(
40 d.dir("build", [ 37 appPath,
41 d.dir("web", [ 38 [
42 d.dir("one", [ 39 d.dir(
43 d.dir("inner", [d.file("file.txt", "one")]) 40 "build",
44 ]), 41 [
45 d.dir("two", [ 42 d.dir(
46 d.dir("inner", [d.file("file.txt", "two")]) 43 "web",
47 ]), 44 [
48 d.nothing("nope") 45 d.dir("one", [d.dir("inner", [d.file("file.txt", "on e")])]),
49 ]) 46 d.dir("two", [d.dir("inner", [d.file("file.txt", "tw o")])]),
50 ]) 47 d.nothing("nope")])])]).validate();
51 ]).validate();
52 }); 48 });
53 49
54 integration("serves subdirectories", () { 50 integration("serves subdirectories", () {
55 pubServe(args: [webOne, webTwoInner]); 51 pubServe(args: [webOne, webTwoInner]);
56 52
57 requestShouldSucceed("inner/file.txt", "one", root: webOne); 53 requestShouldSucceed("inner/file.txt", "one", root: webOne);
58 requestShouldSucceed("file.txt", "two", root: webTwoInner); 54 requestShouldSucceed("file.txt", "two", root: webTwoInner);
59 expectNotServed("web"); 55 expectNotServed("web");
60 expectNotServed(p.join("web", "three")); 56 expectNotServed(p.join("web", "three"));
61 57
62 endPubServe(); 58 endPubServe();
63 }); 59 });
64 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698