diff --git a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart index 7cd7cd64f64..78cf4a8494d 100644 --- a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart +++ b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart @@ -9,7 +9,7 @@ library fasta.testing.kernel_chain; import 'dart:async' show Future; -import 'dart:io' show Directory, File, IOSink; +import 'dart:io' show Directory, File, IOSink, Platform; import 'dart:typed_data' show Uint8List; @@ -275,7 +275,17 @@ class BytesCollector implements Sink> { } Future runDiff(Uri expected, String actual) async { - // TODO(ahe): Implement this for Windows. + if (Platform.isWindows) { + // TODO(ahe): Implement this for Windows. + return """ +==> Expected ($expected) <== +${new File.fromUri(expected).readAsStringSync()} + +==> Actual <== +$actual + +"""; + } StdioProcess process = await StdioProcess .run("diff", ["-u", expected.toFilePath(), "-"], input: actual); return process.output;