function generateHtmlFile(script) {
  var scriptPath = pathMod.resolve(pathMod.join(__dirname, '../', script));
  var contents = fsMod.readFileSync(scriptPath, {'encoding': 'utf-8'});
  var LITERAL = 'goog.module';
  var pos = contents.indexOf(LITERAL);
  if (pos != -1) {
    var pos2 = contents.indexOf(';', pos);
    var moduleName = contents.substring(pos + LITERAL.length + 2, pos2 - 2);
    return createTestModule(script, moduleName);
  } else {
    return createTestFile(script);
  }
}
Generates test HTML for a given test script. Depending on how the test is
written (i.e. goog.module or not), the HTML generated will be different since
different code injection is needed.
@param {string} script Path of the script, e.g. tests/foo_test.js.
@return {string} Generated file path.