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

Side by Side Diff: tests/standalone/io/file_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
« no previous file with comments | « tests/standalone/io/file_non_ascii_sync_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
(...skipping 10 matching lines...) Expand all
21 nonAsciiDir.exists().then((result) { 21 nonAsciiDir.exists().then((result) {
22 Expect.isTrue(result); 22 Expect.isTrue(result);
23 File nonAsciiFile = new File('${nonAsciiDir.path}/æøå.txt'); 23 File nonAsciiFile = new File('${nonAsciiDir.path}/æøå.txt');
24 nonAsciiFile.writeAsString('æøå').then((_) { 24 nonAsciiFile.writeAsString('æøå').then((_) {
25 nonAsciiFile.exists().then((result) { 25 nonAsciiFile.exists().then((result) {
26 Expect.isTrue(result); 26 Expect.isTrue(result);
27 nonAsciiFile.readAsString().then((contents) { 27 nonAsciiFile.readAsString().then((contents) {
28 // The contents of the file is precomposed utf8. 28 // The contents of the file is precomposed utf8.
29 Expect.equals(precomposed, contents); 29 Expect.equals(precomposed, contents);
30 nonAsciiFile.create().then((_) { 30 nonAsciiFile.create().then((_) {
31 var d = nonAsciiFile.directory; 31 var d = nonAsciiFile.parent;
32 Expect.isTrue(d.path.endsWith(precomposed) || 32 Expect.isTrue(d.path.endsWith(precomposed) ||
33 d.path.endsWith(decomposed)); 33 d.path.endsWith(decomposed));
34 nonAsciiFile.length().then((length) { 34 nonAsciiFile.length().then((length) {
35 Expect.equals(6, length); 35 Expect.equals(6, length);
36 nonAsciiFile.lastModified().then((_) { 36 nonAsciiFile.lastModified().then((_) {
37 nonAsciiFile.fullPath().then((path) { 37 nonAsciiFile.resolveSymbolicLinks().then((path) {
38 Expect.isTrue(path.endsWith('${precomposed}.txt') || 38 Expect.isTrue(path.endsWith('${precomposed}.txt') ||
39 path.endsWith('${decomposed}.txt')); 39 path.endsWith('${decomposed}.txt'));
40 tempDir.delete(recursive: true).then((_) { 40 tempDir.delete(recursive: true).then((_) {
41 asyncEnd(); 41 asyncEnd();
42 }); 42 });
43 }); 43 });
44 }); 44 });
45 }); 45 });
46 }); 46 });
47 }); 47 });
48 }); 48 });
49 }); 49 });
50 }); 50 });
51 }); 51 });
52 }).catchError((e) { 52 }).catchError((e) {
53 Expect.fail("File not found"); 53 Expect.fail("File not found");
54 }); 54 });
55 } 55 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_non_ascii_sync_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698