Skip to content

Commit

Permalink
✅ Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Dec 13, 2024
1 parent 56fd90c commit ddab980
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/add/common/add_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,26 @@ void main() {
});

test('adds a package with a multi-component name from path', () async {
await d.dir('foo', [d.libPubspec('fo_o1.a', '1.0.0')]).create();
await d.dir('fo_o1', [d.libPubspec('fo_o1.a', '1.0.0')]).create();
await d.dir('fo_o2', [d.libPubspec('fo_o2.a', '1.0.0')]).create();
await d.dir('fo_o3', [d.libPubspec('fo_o3.a', '1.0.0')]).create();

await d.appDir(dependencies: {}).create();

await pubAdd(args: ['fo_o1.a:{"path":"../foo"}']);
await pubAdd(args: ['fo_o1.a:{"path":"../fo_o1"}']);
await pubAdd(args: ['\'fo_o2.a:{"path":"../fo_o2"}\'']);
await pubAdd(args: ["\"fo_o3.a:{'path':'../fo_o3'}\""]);

await d.appPackageConfigFile([
d.packageConfigEntry(name: 'fo_o1.a', path: '../foo'),
d.packageConfigEntry(name: 'fo_o1.a', path: '../fo_o1'),
d.packageConfigEntry(name: 'fo_o2.a', path: '../fo_o2'),
d.packageConfigEntry(name: 'fo_o3.a', path: '../fo_o3'),
]).validate();
await d.appDir(
dependencies: {
'fo_o1.a': {'path': '../foo'},
'fo_o1.a': {'path': '../fo_o1'},
'fo_o2.a': {'path': '../fo_o2'},
'fo_o3.a': {'path': '../fo_o3'},
},
).validate();
});
Expand Down

0 comments on commit ddab980

Please sign in to comment.