sdk_directory_has_space_test.dart 828 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
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';

import 'package:path/path.dart' as path;

import 'common.dart';

void main() {
  test('We are in a directory with a space in it', () async {
    // The Flutter SDK should be in a directory with a space in it, to make sure
    // our tools support that.
15
    final String? expectedName = Platform.environment['FLUTTER_SDK_PATH_WITH_SPACE'];
16 17 18
    expect(expectedName, 'flutter sdk');
    expect(expectedName, contains(' '));
    final List<String> parts = path.split(Directory.current.absolute.path);
19
    expect(parts.reversed.take(3), <String?>['bots', 'dev', expectedName]);
20
  }, skip: true); // https://github.com/flutter/flutter/issues/87285
21
}