44
55library dartdoc.compare_output_test;
66
7- import 'dart:async' ;
87import 'dart:convert' ;
98import 'dart:io' ;
109import 'dart:mirrors' ;
1110
1211import 'package:path/path.dart' as p;
1312import 'package:test/test.dart' ;
14- import 'package:which/which.dart' ;
1513
1614const List <String > _filesToIgnore = const < String > ['.DS_Store' ];
1715
18- const _gitBinName = 'git' ;
19-
20- String _gitCache;
16+ const String gitBinName = 'git' ;
2117
2218final _nameStatusLineRegexp = new RegExp (r'(\w)\t(.+)' );
2319
@@ -69,8 +65,6 @@ void main() {
6965 fail ('dartdoc failed' );
7066 }
7167
72- var gitPath = await _gitBinPath ();
73-
7468 args = < String > [
7569 'diff' ,
7670 '--no-index' ,
@@ -80,7 +74,7 @@ void main() {
8074 tempDir.path
8175 ];
8276
83- result = Process .runSync (gitPath , args);
77+ result = Process .runSync (gitBinName , args);
8478
8579 if (result.exitCode == 0 ) return ;
8680
@@ -102,7 +96,7 @@ void main() {
10296 p.join (_testPackageDocsPath, k),
10397 p.join (tempDir.path, k)
10498 ];
105- result = Process .runSync (gitPath , args);
99+ result = Process .runSync (gitBinName , args);
106100 assert (result.exitCode != 0 );
107101 message.add (result.stdout);
108102 }
@@ -167,13 +161,6 @@ void main() {
167161 }, onPlatform: {'windows' : new Skip ('Avoiding parsing git output' )});
168162}
169163
170- Future <String > _gitBinPath () async {
171- if (_gitCache == null ) {
172- _gitCache = await which (_gitBinName);
173- }
174- return _gitCache;
175- }
176-
177164Map <String , String > _parseOutput (
178165 String input, String sourcePath, String tempPath) {
179166 var values = < String , String > {};
0 commit comments