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