Skip to content

Commit

Permalink
Add tests that fail because of slash directions (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTup authored and tvolkert committed Sep 5, 2018
1 parent 515ed1d commit 7ef7e0c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/file/test/common_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ void runCommonTests(
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', () {
Expand All @@ -197,6 +204,13 @@ void runCommonTests(
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', () {
Expand Down

0 comments on commit 7ef7e0c

Please sign in to comment.