| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.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 'package:scheduled_test/scheduled_stream.dart'; | 7 import 'package:scheduled_test/scheduled_stream.dart'; |
| 8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 9 | 9 |
| 10 import '../descriptor.dart' as d; | 10 import '../descriptor.dart' as d; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 }); | 30 }); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 """; | 33 """; |
| 34 | 34 |
| 35 // TODO(nweiz): Currently scheduled_test.setUp doesn't play well with test_pub, | 35 // TODO(nweiz): Currently scheduled_test.setUp doesn't play well with test_pub, |
| 36 // since it only assigns the sandbox directory once the main test body has | 36 // since it only assigns the sandbox directory once the main test body has |
| 37 // run. Fix this and move this to a real setUp call. | 37 // run. Fix this and move this to a real setUp call. |
| 38 void setUp() { | 38 void setUp() { |
| 39 servePackages((builder) { | 39 servePackages((builder) { |
| 40 builder.serveRepoPackage('barback'); | 40 builder.serveRealPackage('barback'); |
| 41 | 41 |
| 42 builder.serve("foo", "1.2.3", | 42 builder.serve("foo", "1.2.3", |
| 43 deps: {'barback': 'any'}, | 43 deps: {'barback': 'any'}, |
| 44 contents: [ | 44 contents: [ |
| 45 d.dir("lib", [ | 45 d.dir("lib", [ |
| 46 d.file("transformer.dart", replaceTransformer("Hello", "Goodbye")) | 46 d.file("transformer.dart", replaceTransformer("Hello", "Goodbye")) |
| 47 ]) | 47 ]) |
| 48 ]); | 48 ]); |
| 49 | 49 |
| 50 builder.serve("bar", "1.2.3", | 50 builder.serve("bar", "1.2.3", |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 d.dir(appPath, [ | 202 d.dir(appPath, [ |
| 203 d.dir(".pub/transformers", [ | 203 d.dir(".pub/transformers", [ |
| 204 d.file("manifest.txt", "0.1.2+3\nfoo"), | 204 d.file("manifest.txt", "0.1.2+3\nfoo"), |
| 205 d.matcherFile("transformers.snapshot", isNot(isEmpty)) | 205 d.matcherFile("transformers.snapshot", isNot(isEmpty)) |
| 206 ]) | 206 ]) |
| 207 ]).validate(); | 207 ]).validate(); |
| 208 }); | 208 }); |
| 209 | 209 |
| 210 integration("recaches if a transitive dependency version changes", () { | 210 integration("recaches if a transitive dependency version changes", () { |
| 211 servePackages((builder) { | 211 servePackages((builder) { |
| 212 builder.serveRepoPackage('barback'); | 212 builder.serveRealPackage('barback'); |
| 213 | 213 |
| 214 builder.serve("foo", "1.2.3", | 214 builder.serve("foo", "1.2.3", |
| 215 deps: { | 215 deps: { |
| 216 'barback': 'any', | 216 'barback': 'any', |
| 217 'bar': 'any' | 217 'bar': 'any' |
| 218 }, | 218 }, |
| 219 contents: [ | 219 contents: [ |
| 220 d.dir("lib", [ | 220 d.dir("lib", [ |
| 221 d.file("transformer.dart", REPLACE_FROM_LIBRARY_TRANSFORMER) | 221 d.file("transformer.dart", REPLACE_FROM_LIBRARY_TRANSFORMER) |
| 222 ]) | 222 ]) |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 Future apply(Transform transform) { | 337 Future apply(Transform transform) { |
| 338 return transform.primaryInput.readAsString().then((contents) { | 338 return transform.primaryInput.readAsString().then((contents) { |
| 339 transform.addOutput(new Asset.fromString( | 339 transform.addOutput(new Asset.fromString( |
| 340 transform.primaryInput.id, | 340 transform.primaryInput.id, |
| 341 contents.replaceAll("$input", "$output"))); | 341 contents.replaceAll("$input", "$output"))); |
| 342 }); | 342 }); |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 """; | 345 """; |
| 346 } | 346 } |
| OLD | NEW |