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

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

Issue 11316077: Remove non-ascii file names from repo and generate them in tests instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/io/directory_non_ascii_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_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 bbcf4c7e86584e44585b566beafb21370fc46c39..3932731a62e508cc4bf6f2e480827b12bce6eee1 100644
--- a/tests/standalone/io/directory_non_ascii_sync_test.dart
+++ b/tests/standalone/io/directory_non_ascii_sync_test.dart
@@ -5,18 +5,20 @@
import 'dart:io';
main() {
- Directory scriptDir = new File(new Options().script).directorySync();
- var d = new Directory("${scriptDir.path}/æøå");
+ Directory tempDir = new Directory('').createTempSync();
+ 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.
var precomposed = 'æøå';
var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
- Expect.isTrue(d.existsSync());
- d.createSync();
- var temp = new Directory('').createTempSync();
- var temp2 = new Directory("${temp.path}/æøå").createTempSync();
- Expect.isTrue(temp2.path.contains(precomposed) ||
- temp2.path.contains(decomposed));
- temp2.deleteSync();
- temp.deleteSync(recursive: true);
+ Expect.isFalse(nonAsciiDir.existsSync());
+ nonAsciiDir.createSync();
+ Expect.isTrue(nonAsciiDir.existsSync());
+ var temp = new Directory("${tempDir.path}/æøå").createTempSync();
+ Expect.isTrue(temp.path.contains(precomposed) ||
+ temp.path.contains(decomposed));
+ temp.deleteSync();
+ tempDir.deleteSync(recursive: true);
+ Expect.isFalse(nonAsciiDir.existsSync());
+ Expect.isFalse(temp.existsSync());
}
« no previous file with comments | « no previous file | tests/standalone/io/directory_non_ascii_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698