Skip to content

Commit 076d0de

Browse files
apoorvapendseGaurav-Kushwaha-1225
authored andcommitted
compose_box [nfc]: On Windows, skip a test that fails.
Skips the test that fails because of the platform specific path separator being '\' instead of '/ on Windows. Read this excellent explanation by @chrisbobbe for better understanding: https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/failing.20composebox.20test.20while.20running.20check.20script/near/2000301 [greg: rewrote comment]
1 parent a332f80 commit 076d0de

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/widgets/compose_box_test.dart

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:async';
22
import 'dart:convert';
3+
import 'dart:io';
34

45
import 'package:checks/checks.dart';
56
import 'package:file_picker/file_picker.dart';
@@ -581,7 +582,13 @@ void main() {
581582
});
582583

583584
// TODO test what happens when capturing/uploading fails
584-
});
585+
},
586+
// This test fails on Windows because [XFile.name] splits on
587+
// [Platform.pathSeparator], corresponding to the actual host platform
588+
// the test is running on, instead of the path separator for the
589+
// target platform the test is simulating.
590+
// TODO(upstream): unskip after fix to https://github.com/flutter/flutter/issues/161073
591+
skip: Platform.isWindows);
585592
});
586593

587594
group('error banner', () {

0 commit comments

Comments
 (0)