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

Side by Side Diff: test/barback/subdirectories_test.dart

Issue 1282533003: Don't implicitly run "pub get". (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years, 4 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
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 setUp(() { 13 setUp(() {
14 d.dir(appPath, [ 14 d.dir(appPath, [
15 d.appPubspec(), 15 d.appPubspec(),
16 d.dir("web", [ 16 d.dir("web", [
17 d.dir("one", [ 17 d.dir("one", [
18 d.dir("inner", [d.file("file.txt", "one")]) 18 d.dir("inner", [d.file("file.txt", "one")])
19 ]), 19 ]),
20 d.dir("two", [ 20 d.dir("two", [
21 d.dir("inner", [d.file("file.txt", "two")]) 21 d.dir("inner", [d.file("file.txt", "two")])
22 ]), 22 ]),
23 d.dir("nope", [ 23 d.dir("nope", [
24 d.dir("inner", [d.file("file.txt", "nope")]) 24 d.dir("inner", [d.file("file.txt", "nope")])
25 ]) 25 ])
26 ]) 26 ])
27 ]).create(); 27 ]).create();
28
29 pubGet();
28 }); 30 });
29 31
30 var webOne = p.join("web", "one"); 32 var webOne = p.join("web", "one");
31 var webTwoInner = p.join("web", "two", "inner"); 33 var webTwoInner = p.join("web", "two", "inner");
32 34
33 integration("builds subdirectories", () { 35 integration("builds subdirectories", () {
34 schedulePub(args: ["build", webOne, webTwoInner], 36 schedulePub(args: ["build", webOne, webTwoInner],
35 output: new RegExp(r'Built 2 files to "build".')); 37 output: new RegExp(r'Built 2 files to "build".'));
36 38
37 d.dir(appPath, [ 39 d.dir(appPath, [
38 d.dir("build", [ 40 d.dir("build", [
39 d.dir("web", [ 41 d.dir("web", [
40 d.dir("one", [ 42 d.dir("one", [
41 d.dir("inner", [d.file("file.txt", "one")]) 43 d.dir("inner", [d.file("file.txt", "one")])
42 ]), 44 ]),
43 d.dir("two", [ 45 d.dir("two", [
44 d.dir("inner", [d.file("file.txt", "two")]) 46 d.dir("inner", [d.file("file.txt", "two")])
45 ]), 47 ]),
46 d.nothing("nope") 48 d.nothing("nope")
47 ]) 49 ])
48 ]) 50 ])
49 ]).validate(); 51 ]).validate();
50 }); 52 });
51 53
52 integration("serves subdirectories", () { 54 integration("serves subdirectories", () {
53 pubServe(args: [webOne, webTwoInner], shouldGetFirst: true); 55 pubServe(args: [webOne, webTwoInner]);
54 56
55 requestShouldSucceed("inner/file.txt", "one", root: webOne); 57 requestShouldSucceed("inner/file.txt", "one", root: webOne);
56 requestShouldSucceed("file.txt", "two", root: webTwoInner); 58 requestShouldSucceed("file.txt", "two", root: webTwoInner);
57 expectNotServed("web"); 59 expectNotServed("web");
58 expectNotServed(p.join("web", "three")); 60 expectNotServed(p.join("web", "three"));
59 61
60 endPubServe(); 62 endPubServe();
61 }); 63 });
62 } 64 }
OLDNEW
« no previous file with comments | « test/barback/directory_args_test.dart ('k') | test/build/can_specify_output_directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698