B2G/gecko/storage/test/unit/test_locale_collation.js
/**
 * Reads in the test data from the file DATA_BASENAME and returns it as an array
 * of strings.
 *
 * @return The test data as an array of strings.
 */
Reads in the test data from the file DATA_BASENAME and returns it as an array
of strings.

@return The test data as an array of strings.
Reads in the test data from the file DATA_BASENAME and returns it as an array of strings . @return The test data as an array of strings .
function readTestData()
{
  print("Reading in test data.");
  let file = do_get_file(DATA_BASENAME);
  let istream = Cc["@mozilla.org/network/file-input-stream;1"].
                createInstance(Ci.nsIFileInputStream);
  istream.init(file, -1, -1, 0);
  istream.QueryInterface(Components.interfaces.nsILineInputStream);
  let line = {};
  let lines = [];
  while (istream.readLine(line))
    lines.push(line.value); 
  istream.close();
  return lines;
}
function readTestData ( ) { print ( "Reading in test data." ) ; let file = do_get_file ( DATA_BASENAME ) ; let istream = Cc [ "@mozilla.org/network/file-input-stream;1" ] . createInstance ( Ci . nsIFileInputStream ) ; istream . init ( file , - 1 , - 1 , 0 ) ; istream . QueryInterface ( Components . interfaces . nsILineInputStream ) ; let line = { } ; let lines = [ ] ; while ( istream . readLine ( line ) ) lines . push ( line . value ) ; istream . close ( ) ; return lines ; }
Reads in the test data from the file DATA_BASENAME and returns it as an array
 of strings.
Reads in the test data from the file DATA_BASENAME and returns it as an array of strings .