anchor.diff:  
   import 'dart:io';
   
  +import 'package:pub/src/ignore.dart';
   import 'package:test/test.dart';
  -import 'package:pub/src/ignore.dart';
   
   void main() {
     group('pub', () {
  +    void _testIgnorePath(
  +      TestData c,
  +      String path,
  +      bool expected,
  +      bool ignoreCase,
  +    ) {
  +      final casing = 'with ignoreCase = $ignoreCase';
  +      test('${c.name}: Ignore.ignores("$path") == $expected $casing', () {
  +        var hasWarning = false;
  +        final pathWithoutSlash =
  +            path.endsWith('/') ? path.substring(0, path.length - 1) : path;
  +
  +        Iterable<String> listDir(String dir) {
  +          // List the next part of path:
  +          if (dir == pathWithoutSlash) return [];
  +          final nextSlash = path.indexOf('/', dir == '.' ? 0 : dir.length + 1);
  +          return [path.substring(0, nextSlash == -1 ? path.length : nextSlash)];
  +        }
  +
  +        Ignore ignoreForDir(String dir) => c.patterns[dir] == null
  +            ? null
  +            : Ignore(
  +                c.patterns[dir],
  +                onInvalidPattern: (_, __) => hasWarning = true,
  +                ignoreCase: ignoreCase,
  +              );
  +
  +        bool isDir(String candidate) =>
  +            candidate == '.' ||
  +            path.length > candidate.length && path[candidate.length] == '/';
  +
  +        final r = Ignore.listFiles(
  +          beneath: pathWithoutSlash,
  +          includeDirs: true,
  +          listDir: listDir,
  +          ignoreForDir: ignoreForDir,
  +          isDir: isDir,
  +        );
  +        if (expected) {
  +          expect(r, isEmpty,
  +              reason: 'Expected "$path" to be ignored, it was NOT!');
  +        } else {
  +          expect(r, [pathWithoutSlash],
  +              reason: 'Expected "$path" to NOT be ignored, it was IGNORED!');
  +        }
  +
  +        // Also test that the logic of walking the tree works.
  +        final r2 = Ignore.listFiles(
  +            includeDirs: true,
  +            listDir: listDir,
  +            ignoreForDir: ignoreForDir,
  +            isDir: isDir);
  +        if (expected) {
  +          expect(r2, isNot(contains(pathWithoutSlash)),
  +              reason: 'Expected "$path" to be ignored, it was NOT!');
  +        } else {
  +          expect(r2, contains(pathWithoutSlash),
  +              reason: 'Expected "$path" to NOT be ignored, it was IGNORED!');
  +        }
  +        expect(hasWarning, c.hasWarning);
  +      });
  +    }
  +
       for (final c in testData) {
  -      c.paths.forEach(
  -        (path, expected) => test(
  -          '${c.name}: Ignore.ignores("$path") == $expected',
  -          () {
  -            var hasWarning = false;
  -            final pathWithoutSlash =
  -                path.endsWith('/') ? path.substring(0, path.length - 1) : path;
  -
  -            Iterable<String> listDir(String dir) {
  -              // List the next part of path:
  -              if (dir == pathWithoutSlash) return [];
  -              final nextSlash =
  -                  path.indexOf('/', dir == '.' ? 0 : dir.length + 1);
  -              return [
  -                path.substring(0, nextSlash == -1 ? path.length : nextSlash)
  -              ];
  -            }
  -
  -            Ignore ignoreForDir(String dir) => c.patterns[dir] == null
  -                ? null
  -                : Ignore(c.patterns[dir],
  -                    onInvalidPattern: (_, __) => hasWarning = true);
  -
  -            bool isDir(String candidate) =>
  -                candidate == '.' ||
  -                path.length > candidate.length && path[candidate.length] == '/';
  -
  -            final r = Ignore.listFiles(
  -                beneath: pathWithoutSlash,
  -                includeDirs: true,
  -                listDir: listDir,
  -                ignoreForDir: ignoreForDir,
  -                isDir: isDir);
  -            if (expected) {
  -              expect(r, isEmpty,
  -                  reason: 'Expected "$path" to be ignored, it was NOT!');
  -            } else {
  -              expect(r, [pathWithoutSlash],
  -                  reason:
  -                      'Expected "$path" to NOT be ignored, it was IGNORED!');
  -            }
  -
  -            // Also test that the logic of walking the tree works.
  -            final r2 = Ignore.listFiles(
  -                includeDirs: true,
  -                listDir: listDir,
  -                ignoreForDir: ignoreForDir,
  -                isDir: isDir);
  -            if (expected) {
  -              expect(r2, isNot(contains(pathWithoutSlash)),
  -                  reason: 'Expected "$path" to be ignored, it was NOT!');
  -            } else {
  -              expect(r2, contains(pathWithoutSlash),
  -                  reason:
  -                      'Expected "$path" to NOT be ignored, it was IGNORED!');
  -            }
  -            expect(hasWarning, c.hasWarning);
  -          },
  -        ),
  -      );
  +      c.paths.forEach((path, expected) {
  +        if (c.ignoreCase == null) {
  +          _testIgnorePath(c, path, expected, false);
  +          _testIgnorePath(c, path, expected, true);
  +        } else {
  +          _testIgnorePath(c, path, expected, c.ignoreCase);
  +        }
  +      });
       }
     });
   
  
positive.code:     'folder/sub/foo.txt': false,
      'folder/foo.txt': false,
      'folder/a.txt': true,
    })
  ];
  
negative.code:     this.paths, {
      this.hasWarning = false,
      this.skipOnWindows = false,
      this.ignoreCase,
    })  : name = '"${pattern.replaceAll('\n', '\\n')}"',
          patterns = {
            '.': [pattern]
  