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

Side by Side Diff: utils/tests/pub/install/git/lock_version_test.dart

Issue 12794007: Use scheduled_test for Pub tests. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library pub_tests; 5 library pub_tests;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import '../../../../../pkg/pathos/lib/path.dart' as path;
10 import '../../../../../pkg/scheduled_test/lib/scheduled_test.dart';
11
12 import '../../../../pub/io.dart';
13 import '../../descriptor.dart' as d;
9 import '../../test_pub.dart'; 14 import '../../test_pub.dart';
10 15
11 main() { 16 main() {
12 integration('keeps a Git package locked to the version in the lockfile', () { 17 integration('keeps a Git package locked to the version in the lockfile', () {
13 ensureGit(); 18 ensureGit();
14 19
15 git('foo.git', [ 20 d.git('foo.git', [
16 libDir('foo'), 21 d.libDir('foo'),
17 libPubspec('foo', '1.0.0') 22 d.libPubspec('foo', '1.0.0')
18 ]).scheduleCreate(); 23 ]).create();
19 24
20 appDir([{"git": "../foo.git"}]).scheduleCreate(); 25 d.appDir([{"git": "../foo.git"}]).create();
21 26
22 // This install should lock the foo.git dependency to the current revision. 27 // This install should lock the foo.git dependency to the current revision.
23 schedulePub(args: ['install'], 28 schedulePub(args: ['install'],
24 output: new RegExp(r"Dependencies installed!$")); 29 output: new RegExp(r"Dependencies installed!$"));
25 30
26 dir(packagesPath, [ 31 d.dir(packagesPath, [
27 dir('foo', [ 32 d.dir('foo', [
28 file('foo.dart', 'main() => "foo";') 33 d.file('foo.dart', 'main() => "foo";')
29 ]) 34 ])
30 ]).scheduleValidate(); 35 ]).validate();
31 36
32 // Delete the packages path to simulate a new checkout of the application. 37 // Delete the packages path to simulate a new checkout of the application.
33 dir(packagesPath).scheduleDelete(); 38 schedule(() => deleteDir(path.join(sandboxDir, packagesPath)));
34 39
35 git('foo.git', [ 40 d.git('foo.git', [
36 libDir('foo', 'foo 2'), 41 d.libDir('foo', 'foo 2'),
37 libPubspec('foo', '1.0.0') 42 d.libPubspec('foo', '1.0.0')
38 ]).scheduleCommit(); 43 ]).commit();
39 44
40 // This install shouldn't update the foo.git dependency due to the lockfile. 45 // This install shouldn't update the foo.git dependency due to the lockfile.
41 schedulePub(args: ['install'], 46 schedulePub(args: ['install'],
42 output: new RegExp(r"Dependencies installed!$")); 47 output: new RegExp(r"Dependencies installed!$"));
43 48
44 dir(packagesPath, [ 49 d.dir(packagesPath, [
45 dir('foo', [ 50 d.dir('foo', [
46 file('foo.dart', 'main() => "foo";') 51 d.file('foo.dart', 'main() => "foo";')
47 ]) 52 ])
48 ]).scheduleValidate(); 53 ]).validate();
49 }); 54 });
50 } 55 }
OLDNEW
« no previous file with comments | « utils/tests/pub/install/git/different_repo_name_test.dart ('k') | utils/tests/pub/install/git/require_pubspec_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698