[dartdev/test] Added missing test case for https://github.com/dart-lang/sdk/issues/52892

Change-Id: If3b17d9c6d87c126afee6ec962f6049b4942624d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
asiva 2023-09-01 21:05:04 +00:00 committed by Commit Queue
parent 53cd950e7a
commit 36c6daa920

View file

@ -981,6 +981,29 @@ void main() {
expect(result.exitCode, 0);
}, skip: isRunningOnIA32);
test('Compile kernel with invalid output directory', () async {
final p = project(mainSrc: '''void main() {}''');
final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
var result = await p.run(
[
'compile',
'kernel',
'--verbosity=warning',
'-o',
'/somewhere/nowhere/test.dill',
inFile,
],
);
expect(
result.stderr,
predicate(
(dynamic o) => '$o'.contains('Unable to open file'),
),
);
expect(result.exitCode, 255);
});
test('Compile kernel with invalid trailing argument', () async {
final p = project(mainSrc: '''void main() {}''');
final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));