| Index: tests/standalone/io/file_non_ascii_test.dart
|
| diff --git a/tests/standalone/io/file_non_ascii_test.dart b/tests/standalone/io/file_non_ascii_test.dart
|
| index a64beee641bd57c6a39eb95e11817e278a335718..3a3c85dc18682d48bd7080b990ea6b5fe91637ea 100644
|
| --- a/tests/standalone/io/file_non_ascii_test.dart
|
| +++ b/tests/standalone/io/file_non_ascii_test.dart
|
| @@ -15,31 +15,31 @@ main() {
|
| var precomposed = 'æøå';
|
| var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
|
|
|
| - new Directory('').createTemp().then((tempDir) {
|
| - Directory nonAsciiDir = new Directory('${tempDir.path}/æøå');
|
| - nonAsciiDir.create().then((nonAsciiDir) {
|
| - nonAsciiDir.exists().then((result) {
|
| - Expect.isTrue(result);
|
| - File nonAsciiFile = new File('${nonAsciiDir.path}/æøå.txt');
|
| - nonAsciiFile.writeAsString('æøå').then((_) {
|
| - nonAsciiFile.exists().then((result) {
|
| - Expect.isTrue(result);
|
| - nonAsciiFile.readAsString().then((contents) {
|
| - // The contents of the file is precomposed utf8.
|
| - Expect.equals(precomposed, contents);
|
| - nonAsciiFile.create().then((_) {
|
| - var d = nonAsciiFile.directory;
|
| - Expect.isTrue(d.path.endsWith(precomposed) ||
|
| - d.path.endsWith(decomposed));
|
| - nonAsciiFile.length().then((length) {
|
| - Expect.equals(6, length);
|
| - nonAsciiFile.lastModified().then((_) {
|
| - nonAsciiFile.fullPath().then((path) {
|
| - Expect.isTrue(path.endsWith('${precomposed}.txt') ||
|
| - path.endsWith('${decomposed}.txt'));
|
| - tempDir.delete(recursive: true).then((_) {
|
| + Directory.systemTemp.createTemp('dart_file_non_ascii').then((tempDir) {
|
| + Directory nonAsciiDir = new Directory('${tempDir.path}/æøå');
|
| + nonAsciiDir.create().then((nonAsciiDir) {
|
| + nonAsciiDir.exists().then((result) {
|
| + Expect.isTrue(result);
|
| + File nonAsciiFile = new File('${nonAsciiDir.path}/æøå.txt');
|
| + nonAsciiFile.writeAsString('æøå').then((_) {
|
| + nonAsciiFile.exists().then((result) {
|
| + Expect.isTrue(result);
|
| + nonAsciiFile.readAsString().then((contents) {
|
| + // The contents of the file is precomposed utf8.
|
| + Expect.equals(precomposed, contents);
|
| + nonAsciiFile.create().then((_) {
|
| + var d = nonAsciiFile.directory;
|
| + Expect.isTrue(d.path.endsWith(precomposed) ||
|
| + d.path.endsWith(decomposed));
|
| + nonAsciiFile.length().then((length) {
|
| + Expect.equals(6, length);
|
| + nonAsciiFile.lastModified().then((_) {
|
| + nonAsciiFile.fullPath().then((path) {
|
| + Expect.isTrue(path.endsWith('${precomposed}.txt') ||
|
| + path.endsWith('${decomposed}.txt'));
|
| + tempDir.delete(recursive: true).then((_) {
|
| asyncEnd();
|
| - });
|
| + });
|
| });
|
| });
|
| });
|
|
|