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

Unified Diff: tests/standalone/src/io/ProcessCheckArgumentsTest.dart

Issue 9701061: Change quoting in Process implementation on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 8 years, 9 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/src/io/ProcessCheckArgumentsTest.dart
diff --git a/tests/standalone/src/io/ProcessCheckArgumentsTest.dart b/tests/standalone/src/io/ProcessCheckArgumentsTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5cbb710a2fcb1ff25c982253271877b9252609a0
--- /dev/null
+++ b/tests/standalone/src/io/ProcessCheckArgumentsTest.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#import("dart:io");
+#source("ProcessTestUtil.dart");
+
+test(args) {
+ Process process = new Process.start(getDartFileName(), args);
+ // Wait for the process to exit and then check result.
+ process.onExit = (exitCode) {
+ Expect.equals(0, exitCode);
+ process.close();
+ };
+}
+
+main() {
+ // Get the Dart script file which checks arguments.
+ var scriptFile =
+ new File("tests/standalone/src/io/ProcessCheckArgumentsScript.dart");
+ if (!scriptFile.existsSync()) {
+ scriptFile =
+ new File("../tests/standalone/src/io/ProcessCheckArgumentsScript.dart");
+ }
+ test([scriptFile.name, '3', '0', 'a']);
+ test([scriptFile.name, '3', '0', 'a b']);
+ test([scriptFile.name, '3', '0', 'a\tb']);
+ test([scriptFile.name, '3', '1', 'a\tb"']);
+ test([scriptFile.name, '3', '1', 'a"\tb']);
+ test([scriptFile.name, '3', '1', 'a"\t\\\\"b"']);
+ test([scriptFile.name, '4', '0', 'a\tb', 'a']);
+ test([scriptFile.name, '4', '0', 'a\tb', 'a\t\t\t\tb']);
+ test([scriptFile.name, '4', '0', 'a\tb', 'a b']);
+}
+
« runtime/bin/process_impl.dart ('K') | « tests/standalone/src/io/ProcessCheckArgumentsScript.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698