Import path.dart as path rather than p

Fixes #311
This commit is contained in:
Adam Barth
2015-11-17 22:44:54 -08:00
parent b065036a0a
commit cada8b3faa
4 changed files with 33 additions and 33 deletions

View File

@@ -5,7 +5,7 @@
import 'dart:io';
import 'package:args/command_runner.dart';
import 'package:path/path.dart' as p;
import 'package:path/path.dart' as path;
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/commands/init.dart';
import 'package:flutter_tools/src/process.dart';
@@ -37,10 +37,10 @@ defineTests() {
await runner.run(['init', '--out', temp.path])
.then((int code) => expect(code, equals(0)));
String path = p.join(temp.path, 'lib', 'main.dart');
expect(new File(path).existsSync(), true);
String mainPath = path.join(temp.path, 'lib', 'main.dart');
expect(new File(mainPath).existsSync(), true);
ProcessResult exec = Process.runSync(
sdkBinaryName('dartanalyzer'), ['--fatal-warnings', path],
sdkBinaryName('dartanalyzer'), ['--fatal-warnings', mainPath],
workingDirectory: temp.path);
if (exec.exitCode != 0) {
print(exec.stdout);

View File

@@ -6,7 +6,7 @@ import 'dart:io';
import 'package:flutter_tools/src/os_utils.dart';
import 'package:test/test.dart';
import 'package:path/path.dart' as p;
import 'package:path/path.dart' as path;
main() => defineTests();
@@ -23,7 +23,7 @@ defineTests() {
});
test('makeExecutable', () {
File file = new File(p.join(temp.path, 'foo.script'));
File file = new File(path.join(temp.path, 'foo.script'));
file.writeAsStringSync('hello world');
osUtils.makeExecutable(file);