run_with_print 0.0.1 copy "run_with_print: ^0.0.1" to clipboard
run_with_print: ^0.0.1 copied to clipboard

Helper for getting the `print` output in tests.

example/run_with_print_example.dart

// ignore_for_file: avoid_print

import 'dart:io';

import 'package:run_with_print/run_with_print.dart';

void main() {
  runWithPrint((logs) {
    print('test log');
    print('test message');
    stdout.writeln('print logs length: ${logs.length}');
    stdout.writeln(logs);
  });
}
0
likes
140
points
181
downloads

Publisher

unverified uploader

Weekly Downloads

Helper for getting the `print` output in tests.

Documentation

API reference

License

MIT (license)

More

Packages that depend on run_with_print