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

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

Issue 212923006: Rationalize arg handling for pub build and serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 years, 9 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:scheduled_test/scheduled_test.dart';
6
7 import '../descriptor.dart' as d;
8 import '../test_pub.dart';
9 import '../serve/utils.dart';
10
11 main() {
12 initConfig();
13
14 setUp(() {
15 d.dir(appPath, [
16 d.appPubspec(),
17 d.dir('asset', [d.file('file.txt', 'asset')]),
18 d.dir('bar', [d.file('file.txt', 'bar')]),
19 d.dir('foo', [d.file('file.txt', 'foo')]),
20 d.dir('test', [d.file('file.txt', 'test')]),
21 d.dir('web', [d.file('file.txt', 'web')])
22 ]).create();
23 });
24
25 integration("builds only the given directories", () {
26 schedulePub(args: ["build", "foo", "bar"],
27 output: new RegExp(r'Built 4 files to "build".'));
28
29 d.dir(appPath, [
30 d.dir('build', [
31 d.dir('bar', [
32 d.file('file.txt', 'bar'),
33 d.dir('assets', [
34 d.dir('myapp', [
35 d.file('file.txt', 'asset')
36 ])
37 ])
38 ]),
39 d.dir('foo', [
40 d.file('file.txt', 'foo'),
41 d.dir('assets', [
42 d.dir('myapp', [
43 d.file('file.txt', 'asset')
44 ])
45 ])
46 ]),
47 d.nothing('test'),
48 d.nothing('web')
49 ])
50 ]).validate();
51 });
52
53 integration("serves only the given directories", () {
54 pubServe(args: ["foo", "bar"]);
55
56 requestShouldSucceed("file.txt", "bar", root: "bar");
57 requestShouldSucceed("file.txt", "foo", root: "foo");
58 expectNotServed("test");
59 expectNotServed("web");
60
61 endPubServe();
62 });
63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698