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

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

Issue 11316077: Remove non-ascii file names from repo and generate them in tests instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 | « tests/standalone/io/file_non_ascii_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/process_non_ascii_test.dart
diff --git a/tests/standalone/io/process_non_ascii_test.dart b/tests/standalone/io/process_non_ascii_test.dart
index 5ea4e3c1b0ab003e47c75633cab14b446de22da0..d06c6a7440cb6fa97312fb52c4c00e26ef9b9119 100644
--- a/tests/standalone/io/process_non_ascii_test.dart
+++ b/tests/standalone/io/process_non_ascii_test.dart
@@ -3,15 +3,35 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
+import 'dart:isolate';
main() {
- var scriptDir = new File(new Options().script).directorySync();
+ var port = new ReceivePort();
var executable = new File(new Options().executable).fullPathSync();
+ var tempDir = new Directory('').createTempSync();
+ var nonAsciiDir = new Directory('${tempDir.path}/æøå');
+ nonAsciiDir.createSync();
+ var nonAsciiFile = new File('${nonAsciiDir.path}/æøå.dart');
+ var opened = nonAsciiFile.openSync(FileMode.WRITE);
+ opened.writeStringSync(
+"""
+import 'dart:io';
+
+main() {
+ Expect.equals('æøå', new File('æøå.txt').readAsStringSync());
+}
+""");
+ opened.closeSync();
+ var nonAsciiTxtFile = new File('${nonAsciiDir.path}/æøå.txt');
+ opened = nonAsciiTxtFile.openSync(FileMode.WRITE);
+ opened.writeStringSync('æøå');
+ opened.closeSync();
var options = new ProcessOptions();
- options.workingDirectory = "${scriptDir.path}/æøå";
- var script = "${scriptDir.path}/æøå.dart";
- print(options.workingDirectory);
+ options.workingDirectory = nonAsciiDir.path;
+ var script = nonAsciiFile.name;
Process.run(executable, [script], options).then((result) {
Expect.equals(0, result.exitCode);
+ tempDir.deleteSync(recursive: true);
+ port.close();
});
}
« no previous file with comments | « tests/standalone/io/file_non_ascii_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698