mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
686d8f8a22
* Upgrade everything except matcher. * Roll matcher (and test) * Adjust tests that depend on flutter:test directly to depend on a shim * Require use of package:test shim and remove other references to package:test
32 lines
905 B
Dart
32 lines
905 B
Dart
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:file_testing/file_testing.dart';
|
|
import 'package:mockito/mockito.dart';
|
|
|
|
import 'package:flutter_tools/executable.dart' as tools;
|
|
import 'package:flutter_tools/src/cache.dart';
|
|
import 'package:flutter_tools/src/base/io.dart';
|
|
import 'package:flutter_tools/src/base/os.dart';
|
|
|
|
import 'src/common.dart';
|
|
import 'src/context.dart';
|
|
|
|
void main() {
|
|
Cache.disableLocking();
|
|
|
|
int exitCode;
|
|
setExitFunctionForTests((int code) {
|
|
exitCode = code;
|
|
});
|
|
|
|
group('--bug-report', () {
|
|
testUsingContext('generates valid zip file', () async {
|
|
await tools.main(<String>['devices', '--bug-report']);
|
|
expect(exitCode, 0);
|
|
verify(os.zip(any, argThat(hasPath(matches(r'bugreport_01\.zip')))));
|
|
});
|
|
});
|
|
}
|