@@ -15,6 +15,7 @@ import 'package:test/test.dart';
15
15
import 'package:yaml/yaml.dart' ;
16
16
17
17
final Directory _testPackageDir = Directory ('testing/test_package' );
18
+ final Directory _toolExecutableDir = Directory ('testing/tool_executables' );
18
19
19
20
void main () {
20
21
ToolConfiguration toolMap;
@@ -50,10 +51,9 @@ void main() {
50
51
}
51
52
expect (result? .exitCode, equals (0 ));
52
53
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);
57
57
// Have to replace backslashes on Windows with double-backslashes, to
58
58
// escape them for YAML parser.
59
59
var yamlMap = '''
@@ -153,7 +153,7 @@ echo:
153
153
toolErrorCallback: errorCallback,
154
154
);
155
155
expect (errors, isEmpty);
156
- expect (result, isEmpty); // Output is on stderr.
156
+ expect (result, startsWith ( 'this is not dart' ));
157
157
});
158
158
test ('can invoke a pre-snapshotted tool' , () async {
159
159
var result = await runner.run (
0 commit comments