11import 'dart:io' show Platform;
22
3+ import 'package:flutter_gen_core/generators/generator_helper.dart' as helper;
34import 'package:flutter_gen_core/version.gen.dart' ;
45import 'package:test/test.dart' ;
56import 'package:test_process/test_process.dart' ;
@@ -52,7 +53,7 @@ void main() {
5253 await process.shouldExit (0 );
5354 });
5455
55- test ('Execute wrong argments with fluttergen --wrong' , () async {
56+ test ('Execute wrong arguments with fluttergen --wrong' , () async {
5657 var process = await TestProcess .start (
5758 'dart' ,
5859 ['bin/flutter_gen_command.dart' , '--wrong' ],
@@ -67,4 +68,20 @@ void main() {
6768 );
6869 await process.shouldExit (0 );
6970 });
71+
72+ test ('Execute deprecated config with fluttergen' , () async {
73+ final process = await TestProcess .start (
74+ 'dart' ,
75+ [
76+ 'bin/flutter_gen_command.dart' ,
77+ '--config' ,
78+ 'test/deprecated_configs.yaml' ,
79+ ],
80+ );
81+ final errors = (await process.stderr.rest.toList ()).join ('\n ' );
82+ expect (errors, contains (helper.sWarning));
83+ expect (errors, contains ('style' ));
84+ expect (errors, contains ('package_parameter_enabled' ));
85+ await process.shouldExit (0 );
86+ });
7087}
0 commit comments