blob: 30768c499dde395adc1581f685e561bda1a4d2ab [file] [log] [blame]
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. 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:test/test.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
void main() {
test(r'runs even with an empty environment (eg. no $HOME)', () async {
final server = await servePackages();
server.serve('foo', '1.2.3');
await d.appDir({'foo': 'any'}).create();
await pubGet(environment: {
'_PUB_TEST_CONFIG_DIR': null,
if (Platform.isWindows) ...{
'SYSTEMROOT': Platform.environment['SYSTEMROOT'],
'TMP': Platform.environment['TMP'],
},
}, includeParentEnvironment: false);
});
}