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

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

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 years, 6 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
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(appPath, [
17 d.appPubspec(),
18 d.dir("web", [
19 d.dir("one", [
20 d.dir("inner", [d.file("file.txt", "one")])
21 ]),
22 d.dir("two", [
23 d.dir("inner", [d.file("file.txt", "two")])
24 ]),
25 d.dir("nope", [
26 d.dir("inner", [d.file("file.txt", "nope")])
27 ])
28 ])
29 ]).create();
30 });
31
32 var webOne = p.join("web", "one");
33 var webTwoInner = p.join("web", "two", "inner");
34
35 integration("builds subdirectories", () {
36 schedulePub(args: ["build", webOne, webTwoInner],
37 output: new RegExp(r'Built 2 files to "build".'));
38
39 d.dir(appPath, [
40 d.dir("build", [
41 d.dir("web", [
42 d.dir("one", [
43 d.dir("inner", [d.file("file.txt", "one")])
44 ]),
45 d.dir("two", [
46 d.dir("inner", [d.file("file.txt", "two")])
47 ]),
48 d.nothing("nope")
49 ])
50 ])
51 ]).validate();
52 });
53
54 integration("serves subdirectories", () {
55 pubServe(args: [webOne, webTwoInner]);
56
57 requestShouldSucceed("inner/file.txt", "one", root: webOne);
58 requestShouldSucceed("file.txt", "two", root: webTwoInner);
59 expectNotServed("web");
60 expectNotServed(p.join("web", "three"));
61
62 endPubServe();
63 });
64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698