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

Side by Side Diff: test/must_pub_get_test.dart

Issue 1985063004: Fix an edge case in dependency freshness checking. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 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 unified diff | Download patch
« no previous file with comments | « lib/src/entrypoint.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:path/path.dart' as p; 8 import 'package:path/path.dart' as p;
9 import 'package:pub/src/exit_codes.dart' as exit_codes; 9 import 'package:pub/src/exit_codes.dart' as exit_codes;
10 import 'package:pub/src/io.dart'; 10 import 'package:pub/src/io.dart';
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 ]).create(); 332 ]).create();
333 333
334 pubGet(); 334 pubGet();
335 335
336 _touch("pubspec.yaml"); 336 _touch("pubspec.yaml");
337 }); 337 });
338 338
339 _runsSuccessfully(); 339 _runsSuccessfully();
340 }); 340 });
341 341
342 // Regression test for #1416
343 group("a path dependency has a dependency on the root package", () {
344 setUp(() {
345 d.dir("foo", [
346 d.libPubspec("foo", "1.0.0", deps: {"myapp": "any"})
347 ]).create();
348
349 d.dir(appPath, [
350 d.appPubspec({"foo": {"path": "../foo"}})
351 ]).create();
352
353 pubGet();
354
355 _touch("pubspec.lock");
356 });
357
358 _runsSuccessfully();
359 });
360
342 group("the lockfile is newer than .packages, but they're up-to-date", () { 361 group("the lockfile is newer than .packages, but they're up-to-date", () {
343 setUp(() { 362 setUp(() {
344 d.dir(appPath, [ 363 d.dir(appPath, [
345 d.appPubspec({"foo": "1.0.0"}) 364 d.appPubspec({"foo": "1.0.0"})
346 ]).create(); 365 ]).create();
347 366
348 pubGet(); 367 pubGet();
349 368
350 _touch("pubspec.lock"); 369 _touch("pubspec.lock");
351 }); 370 });
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 void _touch(String path) { 458 void _touch(String path) {
440 schedule(() async { 459 schedule(() async {
441 // Delay a bit to make sure the modification times are noticeably different. 460 // Delay a bit to make sure the modification times are noticeably different.
442 // 1s seems to be the finest granularity that dart:io reports. 461 // 1s seems to be the finest granularity that dart:io reports.
443 await new Future.delayed(new Duration(seconds: 1)); 462 await new Future.delayed(new Duration(seconds: 1));
444 463
445 path = p.join(sandboxDir, "myapp", path); 464 path = p.join(sandboxDir, "myapp", path);
446 touch(path); 465 touch(path);
447 }, "touching $path"); 466 }, "touching $path");
448 } 467 }
OLDNEW
« no previous file with comments | « lib/src/entrypoint.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698