OLD | NEW |
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/scheduled_test/lib/scheduled_test.dart'; | 9 import '../../../../../pkg/unittest/lib/unittest.dart'; |
10 | |
11 import '../../descriptor.dart' as d; | |
12 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
13 | 11 |
14 main() { | 12 main() { |
15 group("(regression)", () { | 13 group("(regression)", () { |
16 integration('checks out a package from Git with a trailing slash', () { | 14 integration('checks out a package from Git with a trailing slash', () { |
17 ensureGit(); | 15 ensureGit(); |
18 | 16 |
19 d.git('foo.git', [ | 17 git('foo.git', [ |
20 d.libDir('foo'), | 18 libDir('foo'), |
21 d.libPubspec('foo', '1.0.0') | 19 libPubspec('foo', '1.0.0') |
22 ]).create(); | 20 ]).scheduleCreate(); |
23 | 21 |
24 d.appDir([{"git": "../foo.git/"}]).create(); | 22 appDir([{"git": "../foo.git/"}]).scheduleCreate(); |
25 | 23 |
26 schedulePub(args: ['install'], | 24 schedulePub(args: ['install'], |
27 output: new RegExp(r"Dependencies installed!$")); | 25 output: new RegExp(r"Dependencies installed!$")); |
28 | 26 |
29 d.dir(cachePath, [ | 27 dir(cachePath, [ |
30 d.dir('git', [ | 28 dir('git', [ |
31 d.dir('cache', [d.gitPackageRepoCacheDir('foo')]), | 29 dir('cache', [gitPackageRepoCacheDir('foo')]), |
32 d.gitPackageRevisionCacheDir('foo') | 30 gitPackageRevisionCacheDir('foo') |
33 ]) | 31 ]) |
34 ]).validate(); | 32 ]).scheduleValidate(); |
35 | 33 |
36 d.dir(packagesPath, [ | 34 dir(packagesPath, [ |
37 d.dir('foo', [ | 35 dir('foo', [ |
38 d.file('foo.dart', 'main() => "foo";') | 36 file('foo.dart', 'main() => "foo";') |
39 ]) | 37 ]) |
40 ]).validate(); | 38 ]).scheduleValidate(); |
41 }); | 39 }); |
42 }); | 40 }); |
43 } | 41 } |
OLD | NEW |