Fixes #373. Expect reasonable file mode on Unix
diff --git a/LibTest/io/FileStat/modeString_A01_t01.dart b/LibTest/io/FileStat/modeString_A01_t01.dart
index da4ae8d..6bb1bb7 100644
--- a/LibTest/io/FileStat/modeString_A01_t01.dart
+++ b/LibTest/io/FileStat/modeString_A01_t01.dart
@@ -28,6 +28,6 @@
if (Platform.isWindows) {
Expect.equals("rw-rw-rw-", fs.modeString());
} else {
- Expect.equals("rw-rw-rw-", fs.modeString());
+ Expect.isTrue(fs.modeString().startsWith("rw-"));
}
}
diff --git a/LibTest/io/FileStat/mode_A01_t01.dart b/LibTest/io/FileStat/mode_A01_t01.dart
index a8352ac..6024fed 100644
--- a/LibTest/io/FileStat/mode_A01_t01.dart
+++ b/LibTest/io/FileStat/mode_A01_t01.dart
@@ -27,6 +27,17 @@
if (Platform.isWindows) {
Expect.equals(33206, fs.mode);
} else {
- Expect.equals(33206, fs.mode);
+ List<int> okValues = [
+ 33152, 33154, 33156, 33158, 33168, 33170, 33172, 33174, 33184, 33186,
+ 33188, 33190, 33200, 33202, 33204, 33206
+ ];
+ var modeFound = false;
+ for (var v in okValues) {
+ if (fs.mode == v) {
+ modeFound = true;
+ break;
+ }
+ }
+ Expect.isTrue(modeFound, "Wrong mode: ${fs.mode}");
}
}