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

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

Issue 306693002: Remove support for the special "assets" directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | 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 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 6
7 import 'package:path/path.dart' as path; 7 import 'package:path/path.dart' as path;
8 8
9 import '../descriptor.dart' as d; 9 import '../descriptor.dart' as d;
10 import '../test_pub.dart'; 10 import '../test_pub.dart';
(...skipping 15 matching lines...) Expand all
26 // This test ensures that we're normalizing at some point before we throw the 26 // This test ensures that we're normalizing at some point before we throw the
27 // path at the OS to choke on. 27 // path at the OS to choke on.
28 28
29 integration("handles long relative paths", () { 29 integration("handles long relative paths", () {
30 // Dart2js can take a long time to compile dart code, so we increase the 30 // Dart2js can take a long time to compile dart code, so we increase the
31 // timeout to cope with that. 31 // timeout to cope with that.
32 currentSchedule.timeout *= 3; 32 currentSchedule.timeout *= 3;
33 33
34 d.dir("some_long_dependency_name", [ 34 d.dir("some_long_dependency_name", [
35 d.libPubspec("foo", "0.0.1"), 35 d.libPubspec("foo", "0.0.1"),
36 d.dir("asset", [ 36 d.dir("lib", [
37 d.file("foo.txt", "foo") 37 d.file("foo.txt", "foo")
38 ]) 38 ])
39 ]).create(); 39 ]).create();
40 40
41 // Build a 2,800 character (non-canonicalized) path. 41 // Build a 2,800 character (non-canonicalized) path.
42 var longPath = ""; 42 var longPath = "";
43 for (var i = 0; i < 100; i++) 43 for (var i = 0; i < 100; i++)
44 { 44 {
45 longPath = path.join(longPath, "..", "some_long_dependency_name"); 45 longPath = path.join(longPath, "..", "some_long_dependency_name");
46 } 46 }
47 47
48 d.dir(appPath, [ 48 d.dir(appPath, [
49 d.appPubspec({ 49 d.appPubspec({
50 "foo": {"path": longPath} 50 "foo": {"path": longPath}
51 }), 51 }),
52 d.dir("web", [ 52 d.dir("web", [
53 d.file("index.html", "html"), 53 d.file("index.html", "html"),
54 ]) 54 ])
55 ]).create(); 55 ]).create();
56 56
57 schedulePub(args: ["build"], 57 schedulePub(args: ["build"],
58 output: new RegExp(r'Built 2 files to "build".')); 58 output: new RegExp(r'Built 2 files to "build".'));
59 59
60 d.dir(appPath, [ 60 d.dir(appPath, [
61 d.dir('build', [ 61 d.dir('build', [
62 d.dir('web', [ 62 d.dir('web', [
63 d.file("index.html", "html"), 63 d.file("index.html", "html"),
64 d.dir('assets', [ 64 d.dir('packages', [
65 d.dir('foo', [ 65 d.dir('foo', [
66 d.file('foo.txt', 'foo') 66 d.file('foo.txt', 'foo')
67 ]) 67 ])
68 ]) 68 ])
69 ]) 69 ])
70 ]) 70 ])
71 ]).validate(); 71 ]).validate();
72 }); 72 });
73 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698