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

Side by Side Diff: sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart

Issue 141113011: Support directories other than "web" in pub build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'package:path/path.dart' as path;
8 import 'package:scheduled_test/scheduled_test.dart'; 7 import 'package:scheduled_test/scheduled_test.dart';
9 8
10 import '../descriptor.dart' as d; 9 import '../descriptor.dart' as d;
11 import '../test_pub.dart'; 10 import '../test_pub.dart';
12 11
13 main() { 12 main() {
14 initConfig(); 13 initConfig();
15 14
16 integration("compiles dart.js and interop.js next to entrypoints", () { 15 integration("compiles dart.js and interop.js next to entrypoints", () {
17 // Dart2js can take a long time to compile dart code, so we increase the 16 // Dart2js can take a long time to compile dart code, so we increase the
(...skipping 26 matching lines...) Expand all
44 d.file('interop.js', 'contents of interop.js') 43 d.file('interop.js', 'contents of interop.js')
45 ]) 44 ])
46 ]) 45 ])
47 ]) 46 ])
48 ]) 47 ])
49 ]) 48 ])
50 ]); 49 ]);
51 50
52 d.dir(appPath, [ 51 d.dir(appPath, [
53 d.appPubspec({"browser": "1.0.0"}), 52 d.appPubspec({"browser": "1.0.0"}),
53 d.dir('example', [
54 d.file('file.dart', 'void main() => print("hello");'),
55 d.dir('subdir', [
56 d.file('subfile.dart', 'void main() => print("subhello");')
57 ])
58 ]),
54 d.dir('web', [ 59 d.dir('web', [
55 d.file('file.dart', 'void main() => print("hello");'), 60 d.file('file.dart', 'void main() => print("hello");'),
56 d.dir('subdir', [ 61 d.dir('subweb', [
57 d.file('subfile.dart', 'void main() => print("subhello");') 62 d.file('subfile.dart', 'void main() => print("subhello");')
58 ]) 63 ])
59 ]) 64 ])
60 ]).create(); 65 ]).create();
61 66
62 pubGet(); 67 pubGet();
63 68
64 schedulePub(args: ["build"], 69 schedulePub(args: ["build", "--all"],
65 output: new RegExp(r"Built 12 files!"), 70 output: new RegExp(r"Built 20 files!"));
66 exitCode: 0);
67 71
68 d.dir(appPath, [ 72 d.dir(appPath, [
69 d.dir('build', [ 73 d.dir('build', [
70 d.matcherFile('file.dart.js', isNot(isEmpty)), 74 d.dir('example', [
71 d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)), 75 d.matcherFile('file.dart.js', isNot(isEmpty)),
72 d.matcherFile('file.dart.js.map', isNot(isEmpty)), 76 d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
73 d.dir('packages', [d.dir('browser', [ 77 d.matcherFile('file.dart.js.map', isNot(isEmpty)),
74 d.file('dart.js', 'contents of dart.js'),
75 d.file('interop.js', 'contents of interop.js')
76 ])]),
77 d.dir('subdir', [
78 d.dir('packages', [d.dir('browser', [ 78 d.dir('packages', [d.dir('browser', [
79 d.file('dart.js', 'contents of dart.js'), 79 d.file('dart.js', 'contents of dart.js'),
80 d.file('interop.js', 'contents of interop.js') 80 d.file('interop.js', 'contents of interop.js')
81 ])]), 81 ])]),
82 d.matcherFile('subfile.dart.js', isNot(isEmpty)), 82 d.dir('subdir', [
83 d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)), 83 d.dir('packages', [d.dir('browser', [
84 d.matcherFile('subfile.dart.js.map', isNot(isEmpty)) 84 d.file('dart.js', 'contents of dart.js'),
85 d.file('interop.js', 'contents of interop.js')
86 ])]),
87 d.matcherFile('subfile.dart.js', isNot(isEmpty)),
88 d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)),
89 d.matcherFile('subfile.dart.js.map', isNot(isEmpty))
90 ])
91 ]),
92 d.dir('web', [
93 d.matcherFile('file.dart.js', isNot(isEmpty)),
94 d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
95 d.matcherFile('file.dart.js.map', isNot(isEmpty)),
96 d.dir('packages', [d.dir('browser', [
97 d.file('dart.js', 'contents of dart.js'),
98 d.file('interop.js', 'contents of interop.js')
99 ])]),
100 d.dir('subweb', [
101 d.dir('packages', [d.dir('browser', [
102 d.file('dart.js', 'contents of dart.js'),
103 d.file('interop.js', 'contents of interop.js')
104 ])]),
105 d.matcherFile('subfile.dart.js', isNot(isEmpty)),
106 d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)),
107 d.matcherFile('subfile.dart.js.map', isNot(isEmpty))
108 ])
85 ]) 109 ])
86 ]) 110 ])
87 ]).validate(); 111 ]).validate();
88 }); 112 });
89 } 113 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698