Treat assets as variants only if they share the same filename (#112602)

This commit is contained in:
Jason Simmons
2022-09-28 18:36:20 -07:00
committed by GitHub
parent 5c68452df7
commit 74dfc0708d
2 changed files with 11 additions and 5 deletions

View File

@@ -219,14 +219,18 @@ $assetsSection
writePubspecFile(
'p/p/pubspec.yaml',
'test_package',
assets: <String>['a/foo'],
assets: <String>['a/foo', 'a/bar'],
);
final List<String> assets = <String>['a/foo', 'a/2x/foo'];
final List<String> assets = <String>['a/foo', 'a/2x/foo', 'a/bar'];
writeAssets('p/p/', assets);
const String expectedManifest = '{"packages/test_package/a/foo":'
'["packages/test_package/a/foo","packages/test_package/a/2x/foo"]}';
const String expectedManifest = '{'
'"packages/test_package/a/bar":'
'["packages/test_package/a/bar"],'
'"packages/test_package/a/foo":'
'["packages/test_package/a/foo","packages/test_package/a/2x/foo"]'
'}';
await buildAndVerifyAssets(
assets,