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

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

Issue 25471003: Modify tests to use Directory.systemTemp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 7 years, 2 months 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/directory_non_ascii_sync_test.dart ('k') | tests/standalone/io/directory_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/directory_non_ascii_test.dart
diff --git a/tests/standalone/io/directory_non_ascii_test.dart b/tests/standalone/io/directory_non_ascii_test.dart
index e4aede680a80ed011dff28ca067bd812d1d7c1b1..4bc564b02095d05ed0bdf4ae3d62975b888d45a6 100644
--- a/tests/standalone/io/directory_non_ascii_test.dart
+++ b/tests/standalone/io/directory_non_ascii_test.dart
@@ -15,26 +15,28 @@ main() {
var precomposed = 'æøå';
var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
- new Directory('').createTemp().then((tempDir) {
+ Directory.systemTemp.createTemp('dart_directory_non_ascii').then((tempDir) {
var nonAsciiDir = new Directory("${tempDir.path}/æøå");
- nonAsciiDir.exists().then((e) {
- Expect.isFalse(e);
- nonAsciiDir.create().then((_) {
- nonAsciiDir.exists().then((e) {
- Expect.isTrue(e);
- new Directory("${tempDir.path}/æøå").createTemp().then((temp) {
- Expect.isTrue(temp.path.contains(precomposed) ||
- temp.path.contains(decomposed));
- temp.delete().then((_) {
- tempDir.delete(recursive: true).then((_) {
- Expect.isFalse(temp.existsSync());
- Expect.isFalse(nonAsciiDir.existsSync());
- asyncEnd();
- });
- });
- });
+ nonAsciiDir.exists()
+ .then((e) => Expect.isFalse(e))
+ .then((_) => nonAsciiDir.create())
+ .then((_) => nonAsciiDir.exists())
+ .then((e) => Expect.isTrue(e))
+ .then((_) => new Directory("${tempDir.path}/æøå").createTemp('temp'))
+ .then((temp) {
+ Expect.isTrue(temp.path.contains(precomposed) ||
+ temp.path.contains(decomposed));
+ return temp.delete();
+ }).then((_) => tempDir.createTemp('æøå'))
+ .then((temp) {
+ Expect.isTrue(temp.path.contains(precomposed) ||
+ temp.path.contains(decomposed));
+ return temp.delete();
+ }).then((temp) => Expect.isFalse(temp.existsSync()))
+ .then((_) => tempDir.delete(recursive: true))
+ .then((_) {
+ Expect.isFalse(nonAsciiDir.existsSync());
+ asyncEnd();
});
- });
- });
});
}
« no previous file with comments | « tests/standalone/io/directory_non_ascii_sync_test.dart ('k') | tests/standalone/io/directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698