Add tests that fail because of slash directions (#115)
See #112.
diff --git a/packages/file/test/common_tests.dart b/packages/file/test/common_tests.dart
index 62f3b85..1e5b9f2 100644
--- a/packages/file/test/common_tests.dart
+++ b/packages/file/test/common_tests.dart
@@ -173,6 +173,13 @@
test('disallowsOtherArgumentType', () {
expect(() => fs.directory(123), throwsArgumentError);
});
+
+ // Fails due to
+ // https://github.com/google/file.dart/issues/112
+ test('considersBothSlashesEquivalent', () {
+ fs.directory(r'foo\bar_dir').createSync(recursive: true);
+ expect(fs.directory(r'foo/bar_dir'), exists);
+ });
});
group('file', () {
@@ -197,6 +204,13 @@
test('disallowsOtherArgumentType', () {
expect(() => fs.file(123), throwsArgumentError);
});
+
+ // Fails due to
+ // https://github.com/google/file.dart/issues/112
+ test('considersBothSlashesEquivalent', () {
+ fs.file(r'foo\bar_file').createSync(recursive: true);
+ expect(fs.file(r'foo/bar_file'), exists);
+ });
});
group('link', () {