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

Unified Diff: tests/standalone/io/directory_non_ascii_sync_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
Index: tests/standalone/io/directory_non_ascii_sync_test.dart
diff --git a/tests/standalone/io/directory_non_ascii_sync_test.dart b/tests/standalone/io/directory_non_ascii_sync_test.dart
index f73225f72c0a3bf097b74f724cf80ed442e26644..68eafef73d0eec77d0cb1710d0ba2ea857e3f386 100644
--- a/tests/standalone/io/directory_non_ascii_sync_test.dart
+++ b/tests/standalone/io/directory_non_ascii_sync_test.dart
@@ -6,7 +6,8 @@ import "package:expect/expect.dart";
import 'dart:io';
main() {
- Directory tempDir = new Directory('').createTempSync();
+ Directory tempDir =
+ Directory.systemTemp.createTempSync('dart_directory_non_ascii_sync');
var nonAsciiDir = new Directory("${tempDir.path}/æøå");
// On MacOS you get the decomposed utf8 form of file and directory
// names from the system. Therefore, we have to check for both here.
@@ -15,7 +16,11 @@ main() {
Expect.isFalse(nonAsciiDir.existsSync());
nonAsciiDir.createSync();
Expect.isTrue(nonAsciiDir.existsSync());
- var temp = new Directory("${tempDir.path}/æøå").createTempSync();
+ var temp = new Directory("${tempDir.path}/æøå").createTempSync('tempdir');
+ Expect.isTrue(temp.path.contains(precomposed) ||
+ temp.path.contains(decomposed));
+ temp.deleteSync();
+ temp = tempDir.createTempSync('æøå');
Expect.isTrue(temp.path.contains(precomposed) ||
temp.path.contains(decomposed));
temp.deleteSync();
« no previous file with comments | « tests/standalone/io/directory_list_pause_test.dart ('k') | tests/standalone/io/directory_non_ascii_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698