OLD | NEW |
| (Empty) |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS 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.md file. | |
4 | |
5 /// Command-line utility for helping testing fletch_test_suite.dart outside | |
6 /// test.py. | |
7 /// | |
8 /// Example usage: | |
9 /// | |
10 /// Create a file with messages, for example, messages.txt: | |
11 /// | |
12 /// {"type":"ListTests"} | |
13 /// {"type":"RunTest","name":"test1"} | |
14 /// {"type":"RunTest","name":"test2"} | |
15 /// | |
16 /// Then run this command: | |
17 /// | |
18 /// cat messages.txt | \ | |
19 /// ./third_party/bin/$OS/dart --packages=.packages/ \ | |
20 /// tests/fletch_tests/fletch_test_suite.dart | \ | |
21 /// ./third_party/bin/$OS/dart --packages=.packages \ | |
22 /// tests/fletch_tests/test_suite_consumer.dart | |
23 library fletch_tests.test_suite_consumer; | |
24 | |
25 import 'dart:io' show | |
26 stdin; | |
27 | |
28 import 'fletch_test_suite.dart' show | |
29 utf8Lines; | |
30 | |
31 import 'messages.dart' show | |
32 Message, | |
33 messageTransformer; | |
34 | |
35 main() async { | |
36 await for(Message message in utf8Lines(stdin).transform(messageTransformer)) { | |
37 print(message); | |
38 } | |
39 } | |
OLD | NEW |