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

Unified Diff: utils/tests/pub/install/pub_install_test.dart

Issue 13116020: Clean up the semantics of io.dart operations w.r.t. symlinks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/tests/pub/install/hosted/stay_locked_test.dart ('k') | utils/tests/pub/io_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/install/pub_install_test.dart
diff --git a/utils/tests/pub/install/pub_install_test.dart b/utils/tests/pub/install/pub_install_test.dart
index bdaa25fd18a350ab4246bb1f56fac7c65563042f..f927b54b8f13ac5a682bc244bb8d9f405bc3621c 100644
--- a/utils/tests/pub/install/pub_install_test.dart
+++ b/utils/tests/pub/install/pub_install_test.dart
@@ -6,8 +6,10 @@ library pub_tests;
import 'dart:io';
+import '../../../../pkg/pathos/lib/path.dart' as path;
import '../../../../pkg/scheduled_test/lib/scheduled_test.dart';
+import '../../../pub/io.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
@@ -114,6 +116,29 @@ main() {
]).validate();
});
+ integration('overwrites a broken packages directory symlink', () {
+ d.dir(appPath, [
+ d.appPubspec([]),
+ d.dir('packages'),
+ d.libDir('myapp'),
+ d.dir('bin')
+ ]).create();
+
+ scheduleSymlink(
+ path.join(appPath, 'packages'),
+ path.join(appPath, 'bin', 'packages'));
+
+ schedule(() => deleteEntry(path.join(sandboxDir, appPath, 'packages')));
+
+ schedulePub(args: ['install'],
+ output: new RegExp(r"Dependencies installed!$"));
+
+ d.dir(packagesPath, [
+ d.nothing('foo'),
+ d.dir('myapp', [d.file('myapp.dart', 'main() => "myapp";')])
+ ]).validate();
+ });
+
group('creates a packages directory in', () {
integration('"test/" and its subdirectories', () {
d.dir(appPath, [
« no previous file with comments | « utils/tests/pub/install/hosted/stay_locked_test.dart ('k') | utils/tests/pub/io_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698