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

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

Issue 896623005: Use native async/await support in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:path/path.dart' as p;
6 import 'package:scheduled_test/scheduled_test.dart';
7
8 import '../descriptor.dart' as d;
9 import '../serve/utils.dart';
10 import '../test_pub.dart';
11
12 main() {
13 initConfig();
14
15 setUp(() {
16 d.dir(
17 appPath,
18 [
19 d.appPubspec(),
20 d.dir(
21 "web",
22 [
23 d.dir("one", [d.dir("inner", [d.file("file.txt", "one")])]),
24 d.dir("two", [d.dir("inner", [d.file("file.txt", "two")])]),
25 d.dir("nope", [d.dir("inner", [d.file("file.txt", "nope")])] )])]).create();
26 });
27
28 var webOne = p.join("web", "one");
29 var webTwoInner = p.join("web", "two", "inner");
30
31 integration("builds subdirectories", () {
32 schedulePub(
33 args: ["build", webOne, webTwoInner],
34 output: new RegExp(r'Built 2 files to "build".'));
35
36 d.dir(
37 appPath,
38 [
39 d.dir(
40 "build",
41 [
42 d.dir(
43 "web",
44 [
45 d.dir("one", [d.dir("inner", [d.file("file.txt", "on e")])]),
46 d.dir("two", [d.dir("inner", [d.file("file.txt", "tw o")])]),
47 d.nothing("nope")])])]).validate();
48 });
49
50 integration("serves subdirectories", () {
51 pubServe(args: [webOne, webTwoInner]);
52
53 requestShouldSucceed("inner/file.txt", "one", root: webOne);
54 requestShouldSucceed("file.txt", "two", root: webTwoInner);
55 expectNotServed("web");
56 expectNotServed(p.join("web", "three"));
57
58 endPubServe();
59 });
60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698