-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1094: changes from master moved to pre-nnbd for LibTests/io/Pr…
…ocess
- Loading branch information
Showing
29 changed files
with
306 additions
and
300 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,49 +25,19 @@ | |
/// completes with the exit code 0 when the process completes. | ||
/// @author [email protected] | ||
import 'dart:convert'; | ||
import "dart:io"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String command; | ||
List<String> args; | ||
|
||
void setCommand() { | ||
if (Platform.isLinux) { | ||
command = 'echo'; | ||
args = ['-start']; | ||
} | ||
if (Platform.isWindows) { | ||
command = Platform.resolvedExecutable; | ||
args = ['--version']; | ||
} | ||
} | ||
|
||
main() { | ||
setCommand(); | ||
String command = Platform.resolvedExecutable; | ||
List<String> args = [...Platform.executableArguments, '--version']; | ||
asyncStart(); | ||
Process.start(command, args).then((Process process) { | ||
|
||
process.exitCode.then((int value) { | ||
Expect.equals(0, value); | ||
bool pKill = process.kill(); | ||
Expect.isFalse(pKill); | ||
if (Platform.isWindows) { | ||
asyncEnd(); | ||
} | ||
Expect.equals(0, value); | ||
asyncEnd(); | ||
}); | ||
|
||
if (!Platform.isWindows) { | ||
process.stdout.toList().then((List outList) { | ||
Utf8Decoder decode = new Utf8Decoder(); | ||
String decoded = decode.convert(outList[0]); | ||
Expect.isTrue(decoded.contains("-start")); | ||
}).then((_) { | ||
process.stderr.toList().then((List errList) { | ||
Expect.equals(0, errList.length); | ||
asyncEnd(); | ||
}); | ||
}); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.