Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdm committed Sep 27, 2024
1 parent 9bd845b commit c93016c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/add/common/add_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1148,4 +1148,14 @@ dependency_overrides:

await pubAdd(args: ['foo'], output: contains('+ foo 1.0.0'));
});

test('`--offline` works', () async {
final server = await servePackages();
server.serve('foo', '1.0.0');
await runPub(args: ['cache', 'add', 'foo', '--version', '1.0.0']);

await d.appDir().create();
server.serve('foo', '2.0.0');
await pubAdd(args: ['foo', '--offline']);
});
}

0 comments on commit c93016c

Please sign in to comment.