| Index: test/posix_test.dart
|
| diff --git a/test/posix_test.dart b/test/posix_test.dart
|
| index d6d7a90e99030bc17cba0c4cc06200191625af15..2cdda23fc8c99e083b474aef5182522f6bc16a5a 100644
|
| --- a/test/posix_test.dart
|
| +++ b/test/posix_test.dart
|
| @@ -419,6 +419,17 @@ main() {
|
| expect(context.isWithin('baz', '/root/path/bang/baz'), isFalse);
|
| });
|
|
|
| + test('complex cases', () {
|
| + expect(context.isWithin('foo/./bar', 'foo/bar/baz'), isTrue);
|
| + expect(context.isWithin('foo//bar', 'foo/bar/baz'), isTrue);
|
| + expect(context.isWithin('foo/qux/../bar', 'foo/bar/baz'), isTrue);
|
| + expect(context.isWithin('foo/bar', 'foo/bar/baz/../..'), isFalse);
|
| + expect(context.isWithin('foo/bar', 'foo/bar///'), isFalse);
|
| + expect(context.isWithin('foo/.bar', 'foo/.bar/baz'), isTrue);
|
| + expect(context.isWithin('foo/./bar', 'foo/.bar/baz'), isFalse);
|
| + expect(context.isWithin('foo/..bar', 'foo/..bar/baz'), isTrue);
|
| + });
|
| +
|
| test('from a relative root', () {
|
| var r = new path.Context(style: path.Style.posix, current: 'foo/bar');
|
| expect(r.isWithin('.', 'a/b/c'), isTrue);
|
|
|