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

Unified Diff: tests/standalone/io/directory_non_ascii_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: Remove last file 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
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 c29e9cef4dc873c53a4b4b1830254870eae9c553..a7b298070f4f4949025cc9fcfebfec9384e28364 100644
--- a/tests/standalone/io/directory_non_ascii_test.dart
+++ b/tests/standalone/io/directory_non_ascii_test.dart
@@ -7,22 +7,26 @@ import 'dart:isolate';
main() {
var port = new ReceivePort();
- Directory scriptDir = new File(new Options().script).directorySync();
- var d = new Directory("${scriptDir.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]);
- d.exists().then((e) {
- Expect.isTrue(e);
- d.create().then((_) {
- new Directory('').createTemp().then((temp) {
- new Directory("${temp.path}/æøå").createTemp().then((temp2) {
- Expect.isTrue(temp2.path.contains(precomposed) ||
- temp2.path.contains(decomposed));
- temp2.delete().then((_) {
- temp.delete(recursive: true).then((_) {
- port.close();
+
+ new Directory('').createTemp().then((tempDir) {
+ var d = new Directory("${tempDir.path}/æøå");
+ d.exists().then((e) {
+ Expect.isFalse(e);
+ d.create().then((_) {
+ d.exists().then((e) {
+ Expect.isTrue(e);
+ new Directory("${tempDir.path}/æøå").createTemp().then((temp2) {
+ Expect.isTrue(temp2.path.contains(precomposed) ||
+ temp2.path.contains(decomposed));
+ temp2.delete().then((_) {
+ tempDir.delete(recursive: true).then((_) {
+ port.close();
ricow1 2012/11/19 12:20:54 same suggestion as the other test, should we asser
Mads Ager (google) 2012/11/19 12:26:20 Done.
+ });
});
});
});

Powered by Google App Engine
This is Rietveld 408576698