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, [ |