anchor.diff:              'More than one "// SharedOptions=" line in test $filePath');
         }
         sharedOptions = match[1].split(' ').where((e) => e != '').toList();
  +    }
  +
  +    matches = environmentRegExp.allMatches(contents);
  +    for (var match in matches) {
  +      final String envDef = match[1];
  +      final int pos = envDef.indexOf('=');
  +      final String name = (pos < 0) ? envDef : envDef.substring(0, pos);
  +      final String value = (pos < 0) ? '' : envDef.substring(pos + 1);
  +      environment ??= <String, String>{};
  +      environment[name] = value;
       }
   
       matches = packageRootRegExp.allMatches(contents);
  
positive.code:    *
     *     // DartOptions=--flag1 --flag2
     *
     *   - For tests that depend on compiling other files with dart2js (e.g.
     *   isolate tests that use multiple source scripts), you can specify
     *   additional files to compile using a comment too, as follows:
  
negative.code:     var result = <List<String>>[];
      List<String> dartOptions;
      List<String> sharedOptions;
      Map<String, String> environment;
      String packageRoot;
      String packages;
  
  