| 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 import 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
| 6 | 6 |
| 7 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
| 8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
| 9 | 9 |
| 10 const REPLACE_FROM_LIBRARY_TRANSFORMER = """ | 10 const REPLACE_FROM_LIBRARY_TRANSFORMER = """ |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 process.stdout.expect("Goodbye!"); | 164 process.stdout.expect("Goodbye!"); |
| 165 process.shouldExit(); | 165 process.shouldExit(); |
| 166 | 166 |
| 167 d.dir(appPath, [ | 167 d.dir(appPath, [ |
| 168 d.dir(".pub/transformers", [ | 168 d.dir(".pub/transformers", [ |
| 169 d.file("manifest.txt", "0.1.2+3\nfoo"), | 169 d.file("manifest.txt", "0.1.2+3\nfoo"), |
| 170 d.matcherFile("transformers.snapshot", isNot(isEmpty)) | 170 d.matcherFile("transformers.snapshot", isNot(isEmpty)) |
| 171 ]) | 171 ]) |
| 172 ]).validate(); | 172 ]).validate(); |
| 173 | 173 |
| 174 servePackages((builder) { | 174 globalPackageServer.add((builder) { |
| 175 builder.serve("foo", "2.0.0", | 175 builder.serve("foo", "2.0.0", |
| 176 deps: {'barback': 'any'}, | 176 deps: {'barback': 'any'}, |
| 177 contents: [ | 177 contents: [ |
| 178 d.dir("lib", [ | 178 d.dir("lib", [ |
| 179 d.file("transformer.dart", replaceTransformer("Hello", "New")) | 179 d.file("transformer.dart", replaceTransformer("Hello", "New")) |
| 180 ]) | 180 ]) |
| 181 ]); | 181 ]); |
| 182 }); | 182 }); |
| 183 | 183 |
| 184 d.dir(appPath, [ | 184 d.dir(appPath, [ |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 d.file("myapp.dart", "main() => print('Hello!');") | 235 d.file("myapp.dart", "main() => print('Hello!');") |
| 236 ]) | 236 ]) |
| 237 ]).create(); | 237 ]).create(); |
| 238 | 238 |
| 239 pubGet(); | 239 pubGet(); |
| 240 | 240 |
| 241 var process = pubRun(args: ['myapp']); | 241 var process = pubRun(args: ['myapp']); |
| 242 process.stdout.expect("Goodbye!"); | 242 process.stdout.expect("Goodbye!"); |
| 243 process.shouldExit(); | 243 process.shouldExit(); |
| 244 | 244 |
| 245 servePackages((builder) { | 245 globalPackageServer.add((builder) { |
| 246 builder.serve("bar", "2.0.0", contents: [ | 246 builder.serve("bar", "2.0.0", contents: [ |
| 247 d.dir("lib", [ | 247 d.dir("lib", [ |
| 248 d.file("bar.dart", "final replacement = 'See ya';") | 248 d.file("bar.dart", "final replacement = 'See ya';") |
| 249 ]) | 249 ]) |
| 250 ]); | 250 ]); |
| 251 }); | 251 }); |
| 252 | 252 |
| 253 d.dir(appPath, [ | 253 d.dir(appPath, [ |
| 254 d.pubspec({ | 254 d.pubspec({ |
| 255 "name": "myapp", | 255 "name": "myapp", |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 Future apply(Transform transform) { | 333 Future apply(Transform transform) { |
| 334 return transform.primaryInput.readAsString().then((contents) { | 334 return transform.primaryInput.readAsString().then((contents) { |
| 335 transform.addOutput(new Asset.fromString( | 335 transform.addOutput(new Asset.fromString( |
| 336 transform.primaryInput.id, | 336 transform.primaryInput.id, |
| 337 contents.replaceAll("$input", "$output"))); | 337 contents.replaceAll("$input", "$output"))); |
| 338 }); | 338 }); |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 """; | 341 """; |
| 342 } | 342 } |
| OLD | NEW |