From 630a7a38826dd6b6f7148311c4b6a247dc3d54c2 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Thu, 4 Apr 2024 15:59:31 +0200 Subject: [PATCH] [ffigen] Ignore formatting in flutter template test (#1076) --- .../flutter_plugin_ffi_test.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/ffigen/test_flutter/flutter_template_tests/flutter_plugin_ffi_test.dart b/pkgs/ffigen/test_flutter/flutter_template_tests/flutter_plugin_ffi_test.dart index aa867313d..13c51415f 100644 --- a/pkgs/ffigen/test_flutter/flutter_template_tests/flutter_plugin_ffi_test.dart +++ b/pkgs/ffigen/test_flutter/flutter_template_tests/flutter_plugin_ffi_test.dart @@ -41,6 +41,15 @@ void main() { ], workingDirectory: tempDirUri, ); + // Don't fail on formatter differences in template. + await runProcess( + executable: 'dart', + arguments: [ + 'format', + bindingsGeneratedUri.toFilePath(), + ], + workingDirectory: tempDirUri, + ); await copyFile( source: bindingsGeneratedUri, target: bindingsGeneratedCopyUri, @@ -60,7 +69,7 @@ void main() { final originalBindings = await readFileAsString(bindingsGeneratedCopyUri); final regeneratedBindings = await readFileAsString(bindingsGeneratedUri); - expect(originalBindings, regeneratedBindings); + expect(regeneratedBindings, originalBindings); }); }