toolexit on malformed yaml (#123167)
[flutter_tools] toolexit on malformed yaml during gen-l10n
This commit is contained in:
committed by
GitHub
parent
4be45e950d
commit
28d707693b
@@ -98,4 +98,19 @@ use-deferred-loading: string
|
||||
throwsException,
|
||||
);
|
||||
});
|
||||
|
||||
testWithoutContext('parseLocalizationsOptions tool exits on malformed Yaml', () async {
|
||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||
template-arb-file: {name}_en.arb
|
||||
''');
|
||||
|
||||
expect(
|
||||
() => parseLocalizationsOptions(
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
),
|
||||
throwsToolExit(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user