| Index: tests/standalone/io/file_non_ascii_sync_test.dart
|
| diff --git a/tests/standalone/io/file_non_ascii_sync_test.dart b/tests/standalone/io/file_non_ascii_sync_test.dart
|
| index d2d56465a9bc1ebcfcfe6bc79120a46c7142309e..170865229b4e045c1c98c405fa5723ef32972353 100644
|
| --- a/tests/standalone/io/file_non_ascii_sync_test.dart
|
| +++ b/tests/standalone/io/file_non_ascii_sync_test.dart
|
| @@ -7,11 +7,19 @@ import 'dart:io';
|
| main() {
|
| Directory scriptDir = new File(new Options().script).directorySync();
|
| var f = new File("${scriptDir.path}/æøå/æøå.dat");
|
| + // 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(f.existsSync());
|
| f.createSync();
|
| - Expect.isTrue(f.directorySync().path.endsWith('æøå'));;
|
| + var path = f.directorySync().path;
|
| + Expect.isTrue(f.directorySync().path.endsWith(precomposed) ||
|
| + f.directorySync().path.endsWith(decomposed));
|
| Expect.equals(6, f.lengthSync());
|
| f.lastModifiedSync();
|
| - Expect.isTrue(f.fullPathSync().endsWith('æøå.dat'));
|
| - Expect.equals('æøå', f.readAsTextSync());
|
| + Expect.isTrue(f.fullPathSync().endsWith('${precomposed}.dat') ||
|
| + f.fullPathSync().endsWith('${decomposed}.dat'));
|
| + // The contents of the file is precomposed utf8.
|
| + Expect.equals(precomposed, f.readAsTextSync());
|
| }
|
|
|