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

Unified Diff: dart/sdk/lib/_internal/pub_generated/test/transformer/cache_test.dart

Issue 651483004: Version 1.7.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.7/
Patch Set: Created 6 years, 2 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 | « dart/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_cache.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/pub_generated/test/transformer/cache_test.dart
===================================================================
--- dart/sdk/lib/_internal/pub_generated/test/transformer/cache_test.dart (revision 41095)
+++ dart/sdk/lib/_internal/pub_generated/test/transformer/cache_test.dart (working copy)
@@ -1,4 +1,5 @@
library pub_tests;
+import 'package:scheduled_test/scheduled_stream.dart';
import 'package:scheduled_test/scheduled_test.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
@@ -40,6 +41,7 @@
d.dir(
"lib",
[d.file("transformer.dart", replaceTransformer("Goodbye", "See ya"))])]);
+ builder.serve("baz", "1.2.3");
});
d.dir(appPath, [d.pubspec({
"name": "myapp",
@@ -215,6 +217,43 @@
process.stdout.expect("See ya!");
process.shouldExit();
});
+ integration("doesn't recache when a transformer is removed", () {
+ setUp();
+ d.dir(appPath, [d.pubspec({
+ "name": "myapp",
+ "dependencies": {
+ "foo": "1.2.3",
+ "bar": "1.2.3"
+ },
+ "transformers": ["foo", "bar"]
+ }),
+ d.dir("bin", [d.file("myapp.dart", "main() => print('Hello!');")])]).create();
+ var process = pubRun(args: ['myapp']);
+ process.stdout.expect("See ya!");
+ process.shouldExit();
+ d.dir(appPath, [d.pubspec({
+ "name": "myapp",
+ "dependencies": {
+ "foo": "1.2.3",
+ "baz": "1.2.3"
+ },
+ "transformers": ["foo"]
+ }),
+ d.dir("bin", [d.file("myapp.dart", "main() => print('Hello!');")])]).create();
+ process = pubRun(args: ['myapp']);
+ process.stdout.expect(
+ "Your pubspec has changed, so we need to update your lockfile:");
+ process.stdout.expect(consumeThrough("Goodbye!"));
+ process.shouldExit();
+ d.dir(
+ appPath,
+ [
+ d.dir(
+ ".pub/transformers",
+ [
+ d.file("manifest.txt", "0.1.2+3\nbar,foo"),
+ d.matcherFile("transformers.snapshot", isNot(isEmpty))])]).validate();
+ });
}
String replaceTransformer(String input, String output) {
return """
« no previous file with comments | « dart/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_cache.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698