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

Side by Side Diff: tests/standalone/io/process_non_ascii_test.dart

Issue 50413005: Reapply "Remove @deprecated features." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 main() { 10 main() {
11 asyncStart(); 11 asyncStart();
12 var executable = new File(Platform.executable).fullPathSync(); 12 var executable = new File(Platform.executable).resolveSymbolicLinksSync();
13 var tempDir = Directory.systemTemp.createTempSync('dart_process_non_ascii'); 13 var tempDir = Directory.systemTemp.createTempSync('dart_process_non_ascii');
14 var nonAsciiDir = new Directory('${tempDir.path}/æøå'); 14 var nonAsciiDir = new Directory('${tempDir.path}/æøå');
15 nonAsciiDir.createSync(); 15 nonAsciiDir.createSync();
16 var nonAsciiFile = new File('${nonAsciiDir.path}/æøå.dart'); 16 var nonAsciiFile = new File('${nonAsciiDir.path}/æøå.dart');
17 nonAsciiFile.writeAsStringSync( 17 nonAsciiFile.writeAsStringSync(
18 """ 18 """
19 import 'dart:io'; 19 import 'dart:io';
20 20
21 main() { 21 main() {
22 if ('æøå' != new File('æøå.txt').readAsStringSync()) { 22 if ('æøå' != new File('æøå.txt').readAsStringSync()) {
23 throw new StateError("not equal"); 23 throw new StateError("not equal");
24 } 24 }
25 } 25 }
26 """); 26 """);
27 var nonAsciiTxtFile = new File('${nonAsciiDir.path}/æøå.txt'); 27 var nonAsciiTxtFile = new File('${nonAsciiDir.path}/æøå.txt');
28 nonAsciiTxtFile.writeAsStringSync('æøå'); 28 nonAsciiTxtFile.writeAsStringSync('æøå');
29 var script = nonAsciiFile.path; 29 var script = nonAsciiFile.path;
30 Process.run(executable, [script], workingDirectory: nonAsciiDir.path) 30 Process.run(executable, [script], workingDirectory: nonAsciiDir.path)
31 .then((result) { 31 .then((result) {
32 Expect.equals(0, result.exitCode); 32 Expect.equals(0, result.exitCode);
33 tempDir.deleteSync(recursive: true); 33 tempDir.deleteSync(recursive: true);
34 asyncEnd(); 34 asyncEnd();
35 }); 35 });
36 } 36 }
OLDNEW
« no previous file with comments | « tests/standalone/io/link_test.dart ('k') | tests/standalone/io/process_working_directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698