@@ -15,6 +15,7 @@ import 'package:test/test.dart';
1515import 'package:yaml/yaml.dart' ;
1616
1717final Directory _testPackageDir = Directory ('testing/test_package' );
18+ final Directory _toolExecutableDir = Directory ('testing/tool_executables' );
1819
1920void main () {
2021 ToolConfiguration toolMap;
@@ -50,10 +51,9 @@ void main() {
5051 }
5152 expect (result? .exitCode, equals (0 ));
5253 setupFile = File (path.join (tempDir.path, 'setup.stamp' ));
53- // We use the Dart executable for our "non-dart" tool
54- // test, because it's the only executable that we know the
55- // exact location of that works on all platforms.
56- var nonDartExecutable = Platform .resolvedExecutable;
54+ var nonDartName = Platform .isWindows ? 'non_dart.bat' : 'non_dart.sh' ;
55+ var nonDartExecutable =
56+ path.join (_toolExecutableDir.absolute.path, nonDartName);
5757 // Have to replace backslashes on Windows with double-backslashes, to
5858 // escape them for YAML parser.
5959 var yamlMap = '''
@@ -153,7 +153,7 @@ echo:
153153 toolErrorCallback: errorCallback,
154154 );
155155 expect (errors, isEmpty);
156- expect (result, isEmpty); // Output is on stderr.
156+ expect (result, startsWith ( 'this is not dart' ));
157157 });
158158 test ('can invoke a pre-snapshotted tool' , () async {
159159 var result = await runner.run (
0 commit comments