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

Unified Diff: utils/tests/pub/pub_test.dart

Issue 10421026: Make pub handle missing git more gracefully. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years, 7 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/pub/pub.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/pub_test.dart
diff --git a/utils/tests/pub/pub_test.dart b/utils/tests/pub/pub_test.dart
index 68850cb8ab390e44bb84ec2663805ceee6bbbeef..0bdfb04776ccf7bc42e753ad8010883987334a10 100644
--- a/utils/tests/pub/pub_test.dart
+++ b/utils/tests/pub/pub_test.dart
@@ -46,7 +46,7 @@ main() {
group('an unknown command', () {
test('displays an error message', () {
runPub(args: ['quylthulg'],
- output: '''
+ error: '''
Unknown command "quylthulg".
Run "pub help" to see available commands.
''',
@@ -143,65 +143,67 @@ installCommand() {
''');
});
-/*
test('checks out a package from Git', () {
- git('foo.git', [
- file('foo.dart', 'main() => "foo";')
- ]).scheduleCreate();
+ withGit(() {
+ git('foo.git', [
+ file('foo.dart', 'main() => "foo";')
+ ]).scheduleCreate();
- dir(appPath, [
- file('pubspec', '''
+ dir(appPath, [
+ file('pubspec', '''
dependencies:
foo:
git: ../foo.git
''')
- ]).scheduleCreate();
+ ]).scheduleCreate();
- dir(packagesPath, [
- dir('foo', [
- file('foo.dart', 'main() => "foo";')
- ])
- ]).scheduleValidate();
+ dir(packagesPath, [
+ dir('foo', [
+ file('foo.dart', 'main() => "foo";')
+ ])
+ ]).scheduleValidate();
- runPub(args: ['install'],
- output: const RegExp(@"Dependencies installed!$"));
+ runPub(args: ['install'],
+ output: const RegExp(@"Dependencies installed!$"));
+ });
});
test('checks out packages transitively from Git', () {
- git('foo.git', [
- file('foo.dart', 'main() => "foo";'),
- file('pubspec', '''
+ withGit(() {
+ git('foo.git', [
+ file('foo.dart', 'main() => "foo";'),
+ file('pubspec', '''
dependencies:
bar:
git: ../bar.git
''')
- ]).scheduleCreate();
+ ]).scheduleCreate();
- git('bar.git', [
- file('bar.dart', 'main() => "bar";')
- ]).scheduleCreate();
+ git('bar.git', [
+ file('bar.dart', 'main() => "bar";')
+ ]).scheduleCreate();
- dir(appPath, [
- file('pubspec', '''
+ dir(appPath, [
+ file('pubspec', '''
dependencies:
foo:
git: ../foo.git
''')
- ]).scheduleCreate();
+ ]).scheduleCreate();
- dir(packagesPath, [
- dir('foo', [
- file('foo.dart', 'main() => "foo";')
- ]),
- dir('bar', [
- file('bar.dart', 'main() => "bar";')
- ])
- ]).scheduleValidate();
+ dir(packagesPath, [
+ dir('foo', [
+ file('foo.dart', 'main() => "foo";')
+ ]),
+ dir('bar', [
+ file('bar.dart', 'main() => "bar";')
+ ])
+ ]).scheduleValidate();
- runPub(args: ['install'],
- output: const RegExp("Dependencies installed!\$"));
+ runPub(args: ['install'],
+ output: const RegExp("Dependencies installed!\$"));
+ });
});
-*/
}
versionCommand() {
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698