| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import 'package:scheduled_test/scheduled_process.dart'; | |
| 6 import 'package:scheduled_test/scheduled_test.dart'; | |
| 7 | |
| 8 import '../test_pub.dart'; | |
| 9 | |
| 10 /// Schedules starting the "pub run" process and validates the expected startup | |
| 11 /// output. | |
| 12 /// | |
| 13 /// if [transformers] is given, it should contain a list of transformer IDs | |
| 14 /// (like "myapp/src/transformer") and this will validate that the output for | |
| 15 /// loading those is shown. | |
| 16 /// | |
| 17 /// Returns the `pub run` process. | |
| 18 ScheduledProcess pubRun({Iterable<String> args, | |
| 19 Iterable<String> transformers}) { | |
| 20 var pub = startPub(args: ["run"]..addAll(args)); | |
| 21 | |
| 22 // This isn't normally printed, but the pub test infrastructure runs pub in | |
| 23 // verbose mode, which enables this. | |
| 24 pub.stdout.expect(startsWith("Loading source assets")); | |
| 25 | |
| 26 if (transformers != null) { | |
| 27 for (var transformer in transformers) { | |
| 28 pub.stdout.expect(startsWith("Loading $transformer transformers")); | |
| 29 } | |
| 30 } | |
| 31 return pub; | |
| 32 } | |
| OLD | NEW |