anchor.diff:          Match match = relativeImportRegExp.firstMatch(line);
           if (match != null) {
             Path relativePath = new Path(match.group(3));
  -          if (foundImports.contains(relativePath)) {
  +          if (foundImports.contains(relativePath.toString())) {
               continue;
             }
             if (relativePath.toString().contains('..')) {
  
positive.code: 
  // Find all relative imports and copy them into the dir that contains
  // the generated tests.
  Set<Path> _findAllRelativeImports(Path topLibrary) {
    Set<Path> toSearch = new Set<Path>.from([topLibrary]);
    Set<Path> foundImports = new Set<Path>();
    Path libraryDir = topLibrary.directoryPath;
    // Matches #import( or #source( followed by " or ' followed by anything
    // except dart:, dart-ext: or /, at the beginning of a line.
    RegExp relativeImportRegExp = new RegExp(
        '^#(import|source)[(]["\'](?!(dart:|dart-ext:|/))([^"\']*)["\']');
    while (!toSearch.isEmpty) {
      var thisPass = toSearch;
      toSearch = new Set<Path>();
  
negative.code:             print("relative paths containing .. are not allowed.");
              exit(1);
            }
            foundImports.add(relativePath.toString());
            toSearch.add(libraryDir.join(relativePath));
          }
        }
  