unpack_test.dart 908 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/commands/unpack.dart';

import '../../src/common.dart';
import '../../src/mocks.dart';
import '../../src/testbed.dart';

void main() {
  Testbed testbed;

  setUpAll(() {
    Cache.disableLocking();
  });

  tearDownAll(() {
    Cache.enableLocking();
  });

  setUp(() {
    testbed = Testbed();
  });

  test('Returns success for linux unconditionally', () => testbed.run(() async {
    final UnpackCommand unpackCommand = UnpackCommand();
    applyMocksToCommand(unpackCommand);

    await createTestCommandRunner(unpackCommand).run(
      <String>[
        'unpack',
        '--cache-dir=foo',
        '--target-platform=linux-x64',
      ],
    );
  }));
}