| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 'package:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
| 8 | 8 |
| 9 import '../descriptor.dart' as d; | 9 import '../descriptor.dart' as d; |
| 10 import '../test_pub.dart'; | 10 import '../test_pub.dart'; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 transform.addOutput(new Asset.fromString( | 50 transform.addOutput(new Asset.fromString( |
| 51 transform.primaryInput.id, | 51 transform.primaryInput.id, |
| 52 "lib/foo.dart: \${results.first}, " | 52 "lib/foo.dart: \${results.first}, " |
| 53 "lib/does/not/exist.dart: \${results.last}")); | 53 "lib/does/not/exist.dart: \${results.last}")); |
| 54 }); | 54 }); |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 """; | 57 """; |
| 58 | 58 |
| 59 main() { | 59 main() { |
| 60 initConfig(); | |
| 61 | |
| 62 integration("caches a transformed dependency", () { | 60 integration("caches a transformed dependency", () { |
| 63 servePackages((builder) { | 61 servePackages((builder) { |
| 64 builder.serveRepoPackage('barback'); | 62 builder.serveRepoPackage('barback'); |
| 65 | 63 |
| 66 builder.serve("foo", "1.2.3", | 64 builder.serve("foo", "1.2.3", |
| 67 deps: {'barback': 'any'}, | 65 deps: {'barback': 'any'}, |
| 68 pubspec: {'transformers': ['foo']}, | 66 pubspec: {'transformers': ['foo']}, |
| 69 contents: [ | 67 contents: [ |
| 70 d.dir("lib", [ | 68 d.dir("lib", [ |
| 71 d.file("transformer.dart", replaceTransformer("Hello", "Goodbye")), | 69 d.file("transformer.dart", replaceTransformer("Hello", "Goodbye")), |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 Future apply(Transform transform) { | 435 Future apply(Transform transform) { |
| 438 return transform.primaryInput.readAsString().then((contents) { | 436 return transform.primaryInput.readAsString().then((contents) { |
| 439 transform.addOutput(new Asset.fromString( | 437 transform.addOutput(new Asset.fromString( |
| 440 transform.primaryInput.id, | 438 transform.primaryInput.id, |
| 441 contents.replaceAll("$input", "$output"))); | 439 contents.replaceAll("$input", "$output"))); |
| 442 }); | 440 }); |
| 443 } | 441 } |
| 444 } | 442 } |
| 445 """; | 443 """; |
| 446 } | 444 } |
| OLD | NEW |