OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import 'package:path/path.dart' as p; |
| 3 import 'package:scheduled_test/scheduled_test.dart'; |
| 4 import '../../../lib/src/io.dart'; |
| 5 import '../../descriptor.dart' as d; |
| 6 import '../../test_pub.dart'; |
| 7 main() { |
| 8 initConfig(); |
| 9 integration("doesn't re-fetch a repository if nothing changes", () { |
| 10 ensureGit(); |
| 11 var repo = |
| 12 d.git('foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]); |
| 13 repo.create(); |
| 14 d.appDir({ |
| 15 "foo": { |
| 16 "git": { |
| 17 "url": "../foo.git" |
| 18 } |
| 19 } |
| 20 }).create(); |
| 21 pubGet(); |
| 22 d.dir( |
| 23 packagesPath, |
| 24 [d.dir('foo', [d.file('foo.dart', 'main() => "foo";')])]).validate(); |
| 25 schedule(() => deleteEntry(p.join(sandboxDir, 'foo.git'))); |
| 26 pubGet(); |
| 27 d.dir( |
| 28 packagesPath, |
| 29 [d.dir('foo', [d.file('foo.dart', 'main() => "foo";')])]).validate(); |
| 30 }); |
| 31 } |
OLD | NEW |