Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: tests/standalone/io/process_shell_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/process_shell_test.dart
diff --git a/tests/standalone/io/process_shell_test.dart b/tests/standalone/io/process_shell_test.dart
index f1acdc9d5f01403bae2a85e7135feb7400f79ecc..1ebc4403c34df98d97bb68e5ce7c44cf1236c603 100644
--- a/tests/standalone/io/process_shell_test.dart
+++ b/tests/standalone/io/process_shell_test.dart
@@ -14,26 +14,26 @@ void testRunShell() {
test(args) {
asyncStart();
var script = Platform.script.resolve("process_echo_util.dart").toFilePath();
- Process.run(Platform.executable,
- [script]..addAll(args),
- runInShell: true)
+ Process
+ .run(Platform.executable, [script]..addAll(args), runInShell: true)
.then((result) {
- if (Platform.operatingSystem == "windows") {
- result = result.stdout.split("\r\n");
- } else {
- result = result.stdout.split("\n");
- }
- if (result.length - 1 != args.length) {
- throw "wrong number of args: $args vs $result";
- }
- for (int i = 0; i < args.length; i++) {
- if (args[i] != result[i]) {
- throw "bad result at $i: '${args[i]}' vs '${result[i]}'";
- }
- }
- asyncEnd();
- });
+ if (Platform.operatingSystem == "windows") {
+ result = result.stdout.split("\r\n");
+ } else {
+ result = result.stdout.split("\n");
+ }
+ if (result.length - 1 != args.length) {
+ throw "wrong number of args: $args vs $result";
+ }
+ for (int i = 0; i < args.length; i++) {
+ if (args[i] != result[i]) {
+ throw "bad result at $i: '${args[i]}' vs '${result[i]}'";
+ }
+ }
+ asyncEnd();
+ });
}
+
test(["\""]);
test(["a b"]);
test(["'"]);
@@ -50,14 +50,14 @@ void testRunShell() {
void testBadRunShell() {
test(exe, [args = const []]) {
asyncStart();
- Process.run(exe, args, runInShell: true)
- .then((result) {
- if (result.exitCode == 0) {
- throw "error expected";
- }
- asyncEnd();
- });
+ Process.run(exe, args, runInShell: true).then((result) {
+ if (result.exitCode == 0) {
+ throw "error expected";
+ }
+ asyncEnd();
+ });
}
+
test("'\"'");
test("'\$HOME'");
}
@@ -66,4 +66,3 @@ void main() {
testRunShell();
testBadRunShell();
}
-

Powered by Google App Engine
This is Rietveld 408576698