use 'dart pub' instead of calling the pub executable directly (#97749)
use 'dart pub' instead of calling the pub executable directly
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:platform/platform.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../../../packages/flutter_tools/test/src/fake_process_manager.dart';
|
||||
import '../dartdoc.dart' show getBranchName;
|
||||
import '../dartdoc.dart' show getBranchName, runPubProcess;
|
||||
|
||||
void main() {
|
||||
const String branchName = 'stable';
|
||||
@@ -77,4 +77,22 @@ void main() {
|
||||
);
|
||||
expect(processManager, hasNoRemainingExpectations);
|
||||
});
|
||||
|
||||
test("runPubProcess doesn't use the pub binary", () {
|
||||
final ProcessManager processManager = FakeProcessManager.list(
|
||||
<FakeCommand>[
|
||||
const FakeCommand(
|
||||
command: <String>['dart', 'pub', '--one', '--two'],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
runPubProcess(
|
||||
dartBinaryPath: 'dart',
|
||||
arguments: <String>['--one', '--two'],
|
||||
processManager: processManager,
|
||||
);
|
||||
|
||||
expect(processManager, hasNoRemainingExpectations);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user