[flutter_tools] Make setting of CWD consistent for flutter test (#74622)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[0-9]+:[0-9]+ [+]1: All tests passed!
|
||||
12
dev/automated_tests/flutter_test/working_directory_test.dart
Normal file
12
dev/automated_tests/flutter_test/working_directory_test.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
// Copyright 2014 The Flutter 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 'dart:io';
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
void main() {
|
||||
test('working directory is the root of this package', () {
|
||||
expect(Directory.current.path, endsWith('automated_tests'));
|
||||
});
|
||||
}
|
||||
@@ -10,8 +10,6 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:vitool/vitool.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
const String kPackagePath = '..';
|
||||
|
||||
void main() {
|
||||
|
||||
test('parsePixels', () {
|
||||
@@ -694,5 +692,5 @@ class PathAnimationMatcher extends Matcher {
|
||||
}
|
||||
|
||||
String testAsset(String name) {
|
||||
return path.join(kPackagePath, 'test_assets', name);
|
||||
return path.join('test_assets', name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user