| 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();
|
| });
|
| }
|
|
|