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

Unified Diff: tools/testing/dart/test_runner.dart

Issue 12379041: Quote all arguments when printing a Command (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 4d879e49f72695533433092b3ceeaab18df63037..262440fa664efcd0cbc2549143566a86f192e0d1 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -107,7 +107,9 @@ class Command {
// TODO(efortuna): Remove this when fixed (Issue 1306).
executable = executable.replaceAll('/', '\\');
}
- commandLine = "$executable ${arguments.join(' ')}";
+ var quotedArguments = [];
+ arguments.forEach((argument) => quotedArguments.add('"$argument"'));
+ commandLine = "$executable ${quotedArguments.join(' ')}";
}
String toString() => commandLine;
@@ -303,10 +305,6 @@ class TestCase {
newArguments.addAll(c.arguments);
final newCommand = new Command(newExecutablePath, newArguments);
newCommands.add(newCommand);
- // If there are extra spaces inside the prefix or suffix, this fails.
- String expected =
- '$prefix ${c.executable} $suffix ${c.arguments.join(' ')}';
- Expect.stringEquals(expected.trim(), newCommand.commandLine);
}
commands = newCommands;
}
@@ -1606,7 +1604,7 @@ class ProcessQueue {
i++;
}
for (Command command in test.commands) {
- print('$i. ${command.commandLine}');
+ print('$i. $command');
i++;
}
}
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698